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; > + } > + els

Re: [HACKERS] NOT NULL markings for BKI columns

2015-04-07 Thread Jeevan Chalke
Hi Andres, Following commit (related to this discussion), added a bug when we use BKI_FORCE_NULL. commit eb68379c38202180bc8e33fb9987284e314b7fc8 Author: Andres Freund Date: Sat Feb 21 22:25:49 2015 +0100 Allow forcing nullness of columns during bootstrap. Bootstrap determines whethe

Re: [HACKERS] NOT NULL markings for BKI columns

2015-02-21 Thread Tom Lane
Andres Freund 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 NULLs and such wou

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 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

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 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. > > I've nam

Re: [HACKERS] NOT NULL markings for BKI columns

2015-02-20 Thread Andres Freund
On 2015-02-15 12:54:45 -0500, Tom Lane wrote: > Andres Freund writes: > > Hm, I was thinking about > > /* extversion should never be null, but the others can be. */ > > textextversion PG_FORCENOTNULL; /* extension version name */ > > but pgindent then removes some of the space

Re: [HACKERS] NOT NULL markings for BKI columns

2015-02-15 Thread Tom Lane
Andres Freund 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. */ > textextver

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 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 e

Re: [HACKERS] NOT NULL markings for BKI columns

2015-02-15 Thread Tom Lane
Andres Freund 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 sane with it?

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 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 pro

Re: [HACKERS] NOT NULL markings for BKI columns

2015-02-15 Thread Tom Lane
Andres Freund 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 C structs are automa