Re: [SQL] Multitable uniqueness ?

2004-05-27 Thread Andreas
Jean-Luc Lachance schrieb: Do you really need MANY-TO-MANY between customers and projects? I can see customers owning many projects, but do you really have projects belonging to many customers? In this case yes. projects ( 1, 'x-fair 2003'; 2, 'y-fair 2003'; 3, 'x-fair 2004') customer ( 1,

Re: [SQL] Multitable uniqueness ?

2004-05-27 Thread Andreas
Bruno Wolff III wrote: On Wed, May 26, 2004 at 05:13:14 +0200, Andreas <[EMAIL PROTECTED]> wrote: Is there a way to have something like this : UNIQUE (table_1.id, table_2.xxx) Postgres doesn't support database constraints at this time which is what you would need to do this simply. We

Re: [SQL] Multitable uniqueness ?

2004-05-27 Thread Jean-Luc Lachance
I can't see your problem. UNIQUE (cp_id, stall_no) will inforce what you want. Unless, you want to use the same customers table to show who visited which stall. In that case you need another relation. You can't have have a stall rented by and stall visited by at the same table. Andreas wrote: Je

[SQL] PostgreSQL is hanging up !?

2004-05-27 Thread Louie Kwan
I have created several domains at Postgresql and I am trying to create some views on a domain "dcenter" using create or replace view cw_nodir_v as select ... However, my PostgreSQL hangs up.. on this domain only but not in other domains... Don't want to reboot PQ, and methods I can find out the