Re: schemas and paths with the alter statement

From: Ragnar Hafstað <gnari(at)simnet(dot)is>
To: Theodore Petrosky <tedpet5(at)yahoo(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: schemas and paths with the alter statement
Date: 2005-02-22 19:26:07
Message-ID: 1109100367.17839.134.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Theodore Petrosky 2005-02-22 19:32:21 Re: schemas and paths with the alter statement
Previous Message Richard Huxton 2005-02-22 19:17:25 Re: schemas and paths with the alter statement