MATCH FULL flawed? - Mailing list pgsql-general

From Alvaro Herrera
Subject MATCH FULL flawed?
Date
Msg-id Pine.LNX.4.33L2.0110220049200.11956-100000@aguila.protecne.cl
Whole thread Raw
Responses Re: MATCH FULL flawed?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Hi:

I'm trying MATCH FULL and it looks like it doesn't work (does anyone use
it anyway?).

encuentro=> select version();
                           version
-------------------------------------------------------------
 PostgreSQL 7.1.3 on i686-pc-linux-gnu, compiled by GCC 2.96
(1 row)

encuentro=> create table test (a serial, b serial, primary key (a, b));
NOTICE:  CREATE TABLE will create implicit sequence 'test_a_seq' for SERIAL column 'test.a'
NOTICE:  CREATE TABLE will create implicit sequence 'test_b_seq' for SERIAL column 'test.b'
NOTICE:  CREATE TABLE/PRIMARY KEY will create implicit index 'test_pkey' for table 'test'
NOTICE:  CREATE TABLE/UNIQUE will create implicit index 'test_a_key' for table 'test'
NOTICE:  CREATE TABLE/UNIQUE will create implicit index 'test_b_key' for table 'test'
CREATE
encuentro=> create table test2 (a integer references test (a) match full, b integer references test (b) match full);
NOTICE:  CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
CREATE
encuentro=> insert into test2 values (null, 1);
INSERT 37655 1
encuentro=> insert into test2 values (1, null);
INSERT 37656 1
encuentro=> insert into test2 values (null, null);
INSERT 37657 1
encuentro=> insert into test2 values (1, 1);
INSERT 37658 1


But from reading the manual I'd say that only the last two should be
allowed.

What's wrong? Am I missing something?

--
Alvaro Herrera (<alvherre[@]atentus.com>)
"La paz mas desventajosa es mejor que la guerra mas justa"


pgsql-general by date:

Previous
From: "Aaron Rouse"
Date:
Subject: Listing users
Next
From: "Mitch Vincent"
Date:
Subject: Re: How to insert with a serial