Re: BUG #17877: Referencing a system column in a foreign key leads to incorrect memory access
Alvaro Herrera <alvherre@alvh.no-ip.org>
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: exclusion@gmail.com, pgsql-bugs@lists.postgresql.org
Date: 2023-03-30T09:57:40Z
Lists: pgsql-bugs
On 2023-Mar-29, Tom Lane wrote: > 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. +1 -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/
Commits
-
Reject system columns as elements of foreign keys.
- f0d65c0eaf05 16.0 landed
- e8d74aac522a 12.15 landed
- bfb993b1bbd1 13.11 landed
- b0b55d8b80d4 14.8 landed
- 6e369817367c 15.3 landed