X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 95EFF8B9B19 for ; Tue, 22 Feb 2005 19:24:57 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 79261-03 for ; Tue, 22 Feb 2005 19:24:51 +0000 (GMT) Received: from quasar.skima.is (quasar.skima.is [212.30.200.205]) by svr1.postgresql.org (Postfix) with ESMTP id BE8F58B9D37 for ; Tue, 22 Feb 2005 19:24:50 +0000 (GMT) Received: from gnari ([157.157.193.193] [157.157.193.193]) by quasar.skima.is with ESMTP; Tue, 22 Feb 2005 19:24:48 Z Subject: Re: schemas and paths with the alter statement From: Ragnar =?ISO-8859-1?Q?Hafsta=F0?= To: Theodore Petrosky Cc: pgsql-sql@postgresql.org In-Reply-To: <20050222190604.90402.qmail@web41005.mail.yahoo.com> References: <20050222190604.90402.qmail@web41005.mail.yahoo.com> Content-Type: text/plain Date: Tue, 22 Feb 2005 19:26:07 +0000 Message-Id: <1109100367.17839.134.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200502/250 X-Sequence-Number: 20361 On Tue, 2005-02-22 at 11:06 -0800, Theodore Petrosky wrote: > I have to first admit that I am very green at this. I > thought that one could refer to a table in a fully > qualified path... public.testtable > ... > ALTER TABLE public.test ADD CONSTRAINT public.test_PK > PRIMARY KEY (test); > ... > aswebtest=# ALTER TABLE public.test ADD CONSTRAINT > public.test_PK PRIMARY KEY (test); > ERROR: syntax error at or near "." at character 46 it not the first public that is the problem, but the second one, as you might discover if you count 46 characters. you cannot put the constraint in a different schema than the table, it seems. gnari