Re: Weird message when creating PK constraint named like table
| От | Thomas Kellerer |
|---|---|
| Тема | Re: Weird message when creating PK constraint named like table |
| Дата | |
| Msg-id | jemo3n$eab$1@dough.gmane.org обсуждение исходный текст |
| Ответ на | Re: Weird message when creating PK constraint named like table ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>) |
| Список | 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" )
);
В списке pgsql-bugs по дате отправления: