Re: [SQL] schemas and paths with the alter statement

2005-02-22 Thread Theodore Petrosky
Wow...in less than 5 minutes Thanks Ted --- Tom Lane <[EMAIL PROTECTED]> wrote: > Theodore Petrosky <[EMAIL PROTECTED]> writes: > > ALTER TABLE public.test ADD CONSTRAINT > public.test_PK > > PRIMARY KEY (test); > > Constraints don't have schema-qualified names. Try > > ALTER TABLE publ

Re: [SQL] schemas and paths with the alter statement

2005-02-22 Thread Ragnar Hafstaư
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); > ... > a

Re: [SQL] schemas and paths with the alter statement

2005-02-22 Thread Richard Huxton
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

Re: [SQL] schemas and paths with the alter statement

2005-02-22 Thread Tom Lane
Theodore Petrosky <[EMAIL PROTECTED]> writes: > ALTER TABLE public.test ADD CONSTRAINT public.test_PK > PRIMARY KEY (test); Constraints don't have schema-qualified names. Try ALTER TABLE public.test ADD CONSTRAINT test_PK PRIMARY KEY (test); The error message was pointing to the correct place B

[SQL] schemas and paths with the alter statement

2005-02-22 Thread Theodore Petrosky
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 publi