Re: Weird message when creating PK constraint named like table

From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Weird message when creating PK constraint named like table
Date: 2012-01-12 13:45:34
Message-ID: jemo3n$eab$1@dough.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Kevin Grittner, 11.01.2012 21:16:
>> When I do this
>>
>> CREATE TABLE "*T1*"
>> (
>> "T1_ID" bigint NOT NULL,
>> CONSTRAINT "*T1*" PRIMARY KEY ("T1_ID" )
>> );
>>
>>
>> I get the following message:
>>
>> NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index
>> "T1" for table "T1"
>> ERROR: relation "T1" already exists
>
>> SQL state: 42P07
>
> Hmm. If I create them with the asterisks as part of the relation
> names, I see the asterisks in the messages:
>
> NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index
> "*T1*" for table "*T1*"
> ERROR: relation "*T1*" already exists
>

The * around the table name was added by the translation from the HTML to a plain text email.

If you display the HTML version of the original posting the name is written in bold, and I gues the plain text "converter" simply adds the asterisks as that is the usual convention for bold in plain text emails.

The original SQL is:

CREATE TABLE "T1"
(
"T1_ID" bigint NOT NULL,
CONSTRAINT "T1" PRIMARY KEY ("T1_ID" )
);

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message franco.ricci 2012-01-12 15:40:13 BUG #6395: Invalid XPath expression
Previous Message Pavel Golub 2012-01-12 12:41:23 Re: Weird message when creating PK constraint named like table