Re: BUG #17877: Referencing a system column in a foreign key leads to incorrect memory access

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: exclusion(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17877: Referencing a system column in a foreign key leads to incorrect memory access
Date: 2023-03-30 09:57:40
Message-ID: 20230330095740.irhck6e5zbt3jqer@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 2023-Mar-29, Tom Lane wrote:

> PG Bug reporting form <noreply(at)postgresql(dot)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/

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David Rowley 2023-03-30 10:54:15 Re: BUG #17879: ERROR: unrecognized node type: 2139062143
Previous Message Devrim Gündüz 2023-03-30 08:45:57 Re: Postgres common repo is missing geos310-3.10.3-1.rhel8.x86_64