Re: pgsql: Cache by-reference missing values in a long lived context

2023-08-27 Thread Andrew Dunstan
On 2023-08-26 Sa 17:41, Tom Lane wrote: Alvaro Herrera writes: On 2023-Aug-25, Tom Lane wrote: ... Were we relying on "{ 0 }" anywhere else pre-v12? We have a few occurrences of {0} in initializations in pg11, so it should work. Ah, indeed. Objection withdrawn then.

Re: pgsql: Cache by-reference missing values in a long lived context

2023-08-26 Thread Tom Lane
Alvaro Herrera writes: > On 2023-Aug-25, Tom Lane wrote: >> ... Were we relying on "{ 0 }" >> anywhere else pre-v12? > We have a few occurrences of {0} in initializations in pg11, so it > should work. Ah, indeed. Objection withdrawn then. regards, tom lane

Re: pgsql: Cache by-reference missing values in a long lived context

2023-08-26 Thread Alvaro Herrera
On 2023-Aug-25, Tom Lane wrote: > Another point that I wasn't thinking of yesterday is that 11 is > still expected to compile on pre-C99 compilers. I'm not sure > to what extent we are still able to test that -- my old animals > have all gone to buildfarm heaven, although I see that Noah's > AIX

Re: pgsql: Cache by-reference missing values in a long lived context

2023-08-25 Thread Tom Lane
Andrew Dunstan writes: > On 2023-08-24 Th 16:57, Tom Lane wrote: >> I'm not sure if those arguments justify a back-patch instead of >> the localized hack you suggest. > Seems like overkill given the age of the surrounding code and the > nearness to EOL of releases 11 and 12. I agree that 11 is

Re: pgsql: Cache by-reference missing values in a long lived context

2023-08-25 Thread Andrew Dunstan
On 2023-08-24 Th 16:57, Tom Lane wrote: Andrew Dunstan writes: On 2023-08-24 Th 11:27, Tom Lane wrote: The v11 version of this patch is causing a compiler warning for me: Sorry about that, fixed. Thanks! While we're about it, let's also fix these warnings which are seen on my systems buil

Re: pgsql: Cache by-reference missing values in a long lived context

2023-08-24 Thread Tom Lane
Andrew Dunstan writes: > On 2023-08-24 Th 11:27, Tom Lane wrote: >> The v11 version of this patch is causing a compiler warning for me: > Sorry about that, fixed. Thanks! > While we're about it, let's also fix these warnings which are seen on my > systems building releases 11 and 12: > /home/

Re: pgsql: Cache by-reference missing values in a long lived context

2023-08-24 Thread Andrew Dunstan
On 2023-08-24 Th 11:27, Tom Lane wrote: Andrew Dunstan writes: Cache by-reference missing values in a long lived context The v11 version of this patch is causing a compiler warning for me: In file included from heaptuple.c:58: heaptuple.c: In function 'missing_hash': heaptuple.c:97:3: warnin

Re: pgsql: Cache by-reference missing values in a long lived context

2023-08-24 Thread Tom Lane
Andrew Dunstan writes: > Cache by-reference missing values in a long lived context The v11 version of this patch is causing a compiler warning for me: In file included from heaptuple.c:58: heaptuple.c: In function 'missing_hash': heaptuple.c:97:3: warning: implicit declaration of function 'hash_

pgsql: Cache by-reference missing values in a long lived context

2023-08-23 Thread Andrew Dunstan
Cache by-reference missing values in a long lived context Attribute missing values might be needed past the lifetime of the tuple descriptors from which they are extracted. To avoid possibly using pointers for by-reference values which might thus be left dangling, we cache a datumCopy'd version of

pgsql: Cache by-reference missing values in a long lived context

2023-08-22 Thread Andrew Dunstan
Cache by-reference missing values in a long lived context Attribute missing values might be needed past the lifetime of the tuple descriptors from which they are extracted. To avoid possibly using pointers for by-reference values which might thus be left dangling, we cache a datumCopy'd version of

pgsql: Cache by-reference missing values in a long lived context

2023-08-22 Thread Andrew Dunstan
Cache by-reference missing values in a long lived context Attribute missing values might be needed past the lifetime of the tuple descriptors from which they are extracted. To avoid possibly using pointers for by-reference values which might thus be left dangling, we cache a datumCopy'd version of

pgsql: Cache by-reference missing values in a long lived context

2023-08-22 Thread Andrew Dunstan
Cache by-reference missing values in a long lived context Attribute missing values might be needed past the lifetime of the tuple descriptors from which they are extracted. To avoid possibly using pointers for by-reference values which might thus be left dangling, we cache a datumCopy'd version of

pgsql: Cache by-reference missing values in a long lived context

2023-08-22 Thread Andrew Dunstan
Cache by-reference missing values in a long lived context Attribute missing values might be needed past the lifetime of the tuple descriptors from which they are extracted. To avoid possibly using pointers for by-reference values which might thus be left dangling, we cache a datumCopy'd version of

pgsql: Cache by-reference missing values in a long lived context

2023-08-22 Thread Andrew Dunstan
Cache by-reference missing values in a long lived context Attribute missing values might be needed past the lifetime of the tuple descriptors from which they are extracted. To avoid possibly using pointers for by-reference values which might thus be left dangling, we cache a datumCopy'd version of

pgsql: Cache by-reference missing values in a long lived context

2023-08-22 Thread Andrew Dunstan
Cache by-reference missing values in a long lived context Attribute missing values might be needed past the lifetime of the tuple descriptors from which they are extracted. To avoid possibly using pointers for by-reference values which might thus be left dangling, we cache a datumCopy'd version of