Re: [GENERAL] Multi-column constraint behaviour

2007-01-17 Thread Bertram Scharpf
Hi, Am Dienstag, 16. Jan 2007, 15:51:58 -0500 schrieb Tom Lane: > Bertram Scharpf <[EMAIL PROTECTED]> writes: > > Is there a deeper reason why the foreign key allows not > > referenced non-null values > > The SQL spec says so. Use MATCH FULL to get the behavior you want. Ah, I should have seen

Re: [GENERAL] Multi-column constraint behaviour

2007-01-16 Thread Alvaro Herrera
Bertram Scharpf wrote: > Hi, > > > please have a look at these introducing statements: > > sandbox=# create table q(i integer, t text, primary key (i,t)); > NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "q_pkey" for > table "q" > CREATE TABLE > sandbox=# create table f(

Re: [GENERAL] Multi-column constraint behaviour

2007-01-16 Thread Stephan Szabo
On Tue, 16 Jan 2007, Bertram Scharpf wrote: > Hi, > > > please have a look at these introducing statements: > > sandbox=# create table q(i integer, t text, primary key (i,t)); > sandbox=# create table f(i integer, t text, foreign key (i,t) references q); > > Now, this is surprising me: > > s

Re: [GENERAL] Multi-column constraint behaviour

2007-01-16 Thread Tom Lane
Bertram Scharpf <[EMAIL PROTECTED]> writes: > Is there a deeper reason why the foreign key allows not > referenced non-null values The SQL spec says so. Use MATCH FULL to get the behavior you want. regards, tom lane ---(end of broadcast)--

[GENERAL] Multi-column constraint behaviour

2007-01-16 Thread Bertram Scharpf
Hi, please have a look at these introducing statements: sandbox=# create table q(i integer, t text, primary key (i,t)); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "q_pkey" for table "q" CREATE TABLE sandbox=# create table f(i integer, t text, foreign key (i,t) refere