Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id C19CC18E38D9 for ; Thu, 12 Jan 2012 09:44:55 -0400 (AST) Received: from lo.gmane.org ([80.91.229.12]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RlKxZ-0006Na-1P for pgsql-bugs@postgresql.org; Thu, 12 Jan 2012 13:44:54 +0000 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RlKxM-0003OU-9k for pgsql-bugs@postgresql.org; Thu, 12 Jan 2012 14:44:40 +0100 Received: from 80.150.102.194 ([80.150.102.194]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 12 Jan 2012 14:44:40 +0100 Received: from spam_eater by 80.150.102.194 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 12 Jan 2012 14:44:40 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-bugs@postgresql.org From: Thomas Kellerer Subject: Re: Weird message when creating PK constraint named like table Date: Thu, 12 Jan 2012 14:45:34 +0100 Lines: 38 Message-ID: References: <4F0D99AB02000025000446C9@gw.wicourts.gov> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 80.150.102.194 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 In-Reply-To: <4F0D99AB02000025000446C9@gw.wicourts.gov> X-Pg-Spam-Score: -2.3 (--) X-Archive-Number: 201201/101 X-Sequence-Number: 32168 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" ) );