pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Theodore Petrosky <tedpet5@yahoo.com>
To: pgsql-sql@postgresql.org
Subject: schemas and paths with the alter statement
Date: Tue, 22 Feb 2005 11:06:04 -0800 (PST)
Message-ID: <20050222190604.90402.qmail@web41005.mail.yahoo.com> (raw)

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



view thread (5+ messages)  latest in thread

Message-ID: <20050222190604.90402.qmail@web41005.mail.yahoo.com>
Permalink:  ../20050222190604.90402.qmail@web41005.mail.yahoo.com/
Also on:    postgresql.org/message-id/20050222190604.90402.qmail@web41005.mail.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tedpet5@yahoo.com
  Subject: Re: schemas and paths with the alter statement
  In-Reply-To: <20050222190604.90402.qmail@web41005.mail.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox