pg.ddx.io pgsql-sql@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Domains and Joins 2+ messages / 2 participants [nested] [flat]
* Domains and Joins @ 2003-06-05 21:38 chester c young <chestercyoung@yahoo.com> 0 siblings, 1 reply; 2+ messages in thread From: chester c young @ 2003-06-05 21:38 UTC (permalink / raw) To: pgsql-sql -- standard setup: create table t1( c1 int primary key, data text ); create domain dom_c1 int references t1 on delete cascade; create table t2( c2 int primary key, c1 dom_c1, moredata text ); -- will not work with "using" create view v1 as select t1.*, t2.moredata from t1 join t2 using( c1 ); -- will work with "on" create view v1 as select t1.*, t2.moredata from t1 join t2 on t1.c1 = t2.c1; is this right? __________________________________ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Domains and Joins @ 2003-06-08 12:23 Rod Taylor <rbt@rbt.ca> parent: chester c young <chestercyoung@yahoo.com> 0 siblings, 0 replies; 2+ messages in thread From: Rod Taylor @ 2003-06-08 12:23 UTC (permalink / raw) To: chester c young <chestercyoung@yahoo.com>; +Cc: pgsql-sql On Thu, 2003-06-05 at 17:38, chester c young wrote: > -- standard setup: > create table t1( c1 int primary key, data text ); > create domain dom_c1 int references t1 on delete cascade; This won't work. Domains support NOT NULL, and CHECK constraints. Foreign keys are not allowed on domains at this time in PostgreSQL or in the SQL99 spec. > create table t2( c2 int primary key, c1 dom_c1, moredata text ); > -- will not work with "using" > create view v1 as select t1.*, t2.moredata > from t1 join t2 using( c1 ); It appears to be a complaint about mis-matched datatypes, which is partially true. It's also a problem in 7.4. I'll see what I can do to fix it. -- Rod Taylor <rbt@rbt.ca> PGP Key: http://www.rbt.ca/rbtpub.asc Attachments: signature.asc (application/pgp-signature, 186B) download ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2003-06-08 12:23 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2003-06-05 21:38 Domains and Joins chester c young <chestercyoung@yahoo.com> 2003-06-08 12:23 ` Rod Taylor <rbt@rbt.ca>
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