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 963A38B9D1E for ; Tue, 22 Feb 2005 19:17:29 +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 74763-09 for ; Tue, 22 Feb 2005 19:17:27 +0000 (GMT) Received: from anchor-post-34.mail.demon.net (anchor-post-34.mail.demon.net [194.217.242.92]) by svr1.postgresql.org (Postfix) with ESMTP id 67E4F8B9CC1 for ; Tue, 22 Feb 2005 19:17:27 +0000 (GMT) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-34.mail.demon.net with esmtp (Exim 4.42) id 1D3fXC-0005t1-FP; Tue, 22 Feb 2005 19:17:27 +0000 Received: from [192.168.1.17] (client17.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id B4730179C8; Tue, 22 Feb 2005 19:17:25 +0000 (GMT) Message-ID: <421B8545.7070509@archonet.com> Date: Tue, 22 Feb 2005 19:17:25 +0000 From: Richard Huxton User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Theodore Petrosky Cc: pgsql-sql@postgresql.org Subject: Re: schemas and paths with the alter statement References: <20050222190604.90402.qmail@web41005.mail.yahoo.com> In-Reply-To: <20050222190604.90402.qmail@web41005.mail.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.062 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200502/249 X-Sequence-Number: 20360 Theodore Petrosky wrote: > I assumed that it would work. Did I miss something in > the docs that say you can not do this? Does "ALTER > TABLE" not work with 'public.' before the table name? > > on 7.4.6 > > aswebtest=# ALTER TABLE public.test ADD CONSTRAINT > public.test_PK PRIMARY KEY (test); > ERROR: syntax error at or near "." at character 46 Are you sure it's not the constraint that is causing the problem (he says, counting 46 characters in). I think a table constraint is by definition in the same schema as its table. -- Richard Huxton Archonet Ltd