Re: [HACKERS] NOT NULL markings for BKI columns

2015-04-09 Thread Andres Freund
Specifically, this code chunk: + if (defined $attopt) + { + if ($attopt eq 'PG_FORCE_NULL') + { + $row{'forcenull'} = 1; + } + elsif

Re: [HACKERS] NOT NULL markings for BKI columns

2015-02-21 Thread Andres Freund
On 2015-02-20 19:06:50 -0300, Alvaro Herrera wrote: Andres Freund wrote: On 2015-02-15 12:54:45 -0500, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: BTW, the precedent of PG_USED_FOR_ASSERTS_ONLY would suggest calling this one PG_FORCE_NOT_NULL, or at least using

Re: [HACKERS] NOT NULL markings for BKI columns

2015-02-21 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On 2015-02-20 19:06:50 -0300, Alvaro Herrera wrote: I think we should just save this part of the patch until some use turns up. I pondered this for a while and I don't agree. If the flag had been available a couple column that now use 0 instead of

Re: [HACKERS] NOT NULL markings for BKI columns

2015-02-20 Thread Alvaro Herrera
Andres Freund wrote: On 2015-02-15 12:54:45 -0500, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: BTW, the precedent of PG_USED_FOR_ASSERTS_ONLY would suggest calling this one PG_FORCE_NOT_NULL, or at least using underscores for word breaks in whatever we end up calling it.

[HACKERS] NOT NULL markings for BKI columns

2015-02-15 Thread Andres Freund
Hi, 8b38a538c0aa5a432dacd90f10805dc667a3d1a0 changed things so that all columns are checked for NOT NULL ness. Which is fine in general, but it currently does make it impossible to have a varlena column (except OID/INT2 vector...) as a key column in syscache. Even if the column is factually NOT

Re: [HACKERS] NOT NULL markings for BKI columns

2015-02-15 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On 2015-02-15 12:31:10 -0500, Tom Lane wrote: Where are you thinking of sticking that exactly, and will pgindent do something sane with it? Hm, I was thinking about /* extversion should never be null, but the others can be. */ text

Re: [HACKERS] NOT NULL markings for BKI columns

2015-02-15 Thread Andres Freund
On 2015-02-15 12:11:52 -0500, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: So, how about providing bootstrap infrastructure for marking columns as NOT NULL? We've not desperately needed it up to now, but if you can think of a clean representation, go for it. I'd want to

Re: [HACKERS] NOT NULL markings for BKI columns

2015-02-15 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: I was thinking of adding BKI_FORCENOTNULL which would be specified on the attributes you want it. The FORCE in there representing that the default choice is overwritten. Where are you thinking of sticking that exactly, and will pgindent do something

Re: [HACKERS] NOT NULL markings for BKI columns

2015-02-15 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: So, how about providing bootstrap infrastructure for marking columns as NOT NULL? We've not desperately needed it up to now, but if you can think of a clean representation, go for it. I'd want to preserve the property that all columns accessible via

Re: [HACKERS] NOT NULL markings for BKI columns

2015-02-15 Thread Andres Freund
On 2015-02-15 12:31:10 -0500, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: I was thinking of adding BKI_FORCENOTNULL which would be specified on the attributes you want it. The FORCE in there representing that the default choice is overwritten. Where are you thinking of