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

2023-04-03 Thread Kyotaro Horiguchi
At Sat, 1 Apr 2023 10:56:08 -0300, Ranier Vilela wrote in > IMO should be: > * System attributes have attribute numbers less or equal to 0 that are > * unique > * within the class, but not constrained to any particular range. Attnum == 0 is invalid and doesn't belong to either user columns or

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

2023-04-01 Thread Ranier Vilela
Em sex., 31 de mar. de 2023 às 16:25, Tom Lane escreveu: > Ranier Vilela writes: > > I think that commit f0d65c0 > > < > https://github.com/postgres/postgres/commit/f0d65c0eaf05d6acd3ae05cde4a31465eb3992b2 > > > > has an oversight. > > Attnum == 0, is system column too, right? > > No, it's not

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

2023-03-31 Thread Tom Lane
Ranier Vilela writes: > I think that commit f0d65c0 > > has an oversight. > Attnum == 0, is system column too, right? No, it's not valid in pg_attribute rows. > All other places at tablecmds.c, has this test:

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

2023-03-31 Thread Ranier Vilela
Hi, I think that commit f0d65c0 has an oversight. Attnum == 0, is system column too, right? All other places at tablecmds.c, has this test: if (attnum <= 0) ereport(ERROR, regards, Ranier Vilela