MATCH FULL flawed?

From: Alvaro Herrera <alvherre(at)atentus(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: MATCH FULL flawed?
Date: 2001-10-22 03:56:22
Message-ID: Pine.LNX.4.33L2.0110220049200.11956-100000@aguila.protecne.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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[(at)]atentus(dot)com>)
"La paz mas desventajosa es mejor que la guerra mas justa"

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2001-10-22 05:13:43 Database corruption?
Previous Message Aaron Rouse 2001-10-22 02:51:06 Listing users