schemas and paths with the alter statement

Поиск
Список
Период
Сортировка
От Theodore Petrosky
Тема schemas and paths with the alter statement
Дата
Msg-id 20050222190604.90402.qmail@web41005.mail.yahoo.com
обсуждение исходный текст
Ответы 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>)
Список 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 по дате отправления:

Предыдущее
От: pginfo
Дата:
Сообщение: Re: pg primary key bug?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: schemas and paths with the alter statement