Re: BUG #17877: Referencing a system column in a foreign key leads to incorrect memory access - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #17877: Referencing a system column in a foreign key leads to incorrect memory access
Date
Msg-id 3994000.1680106346@sss.pgh.pa.us
Whole thread Raw
In response to BUG #17877: Referencing a system column in a foreign key leads to incorrect memory access  (PG Bug reporting form <noreply@postgresql.org>)
Responses Re: BUG #17877: Referencing a system column in a foreign key leads to incorrect memory access  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> The following query:
> CREATE TABLE pt(tid oid, id int, PRIMARY KEY(tid, id));
> CREATE TABLE ft(id int, FOREIGN KEY (tableoid, id) REFERENCES pt);
> produces a valgrind-detected error:

We should probably just disallow system columns as foreign keys.
There was a legitimate use-case for that with OID columns, but
no more.  I can't see a really good reason to use tableoid as a
foreign key, and none of the other system columns are stable
enough for this to be sane at all.  So it's hard to summon
interest in trying to remove bugs of this sort.

            regards, tom lane



pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #17874: Incorrect memory access at gistBuildCallback
Next
From: PG Bug reporting form
Date:
Subject: BUG #17878: Stack Builder checksum failed