schemas and paths with the alter statement - Mailing list pgsql-sql

From Theodore Petrosky
Subject schemas and paths with the alter statement
Date
Msg-id 20050222190604.90402.qmail@web41005.mail.yahoo.com
Whole thread Raw
Responses Re: schemas and paths with the alter statement  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: schemas and paths with the alter statement  (Richard Huxton <dev@archonet.com>)
Re: schemas and paths with the alter statement  (Ragnar Hafstað <gnari@simnet.is>)
List pgsql-sql
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

I am fooling around with webobjects and EOModeler. at
one point it creates the sql to create my table
structure and it does something like:

ALTER TABLE public.test ADD CONSTRAINT public.test_PK
PRIMARY KEY (test);

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

but it works if I remove the 'public.' from both
places

aswebtest=# ALTER TABLE test ADD CONSTRAINT test_PK
PRIMARY KEY (test);
NOTICE:  ALTER TABLE / ADD PRIMARY KEY will create
implicit index "test_pk" for table "test"
ALTER TABLE


Ted

    
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250


pgsql-sql by date:

Previous
From: pginfo
Date:
Subject: Re: pg primary key bug?
Next
From: Tom Lane
Date:
Subject: Re: schemas and paths with the alter statement