Re: Re: starting to review the Extend NOT NULL representation to pg_constraint patch - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Re: starting to review the Extend NOT NULL representation to pg_constraint patch
Date
Msg-id 1308252281-sup-6315@alvh.no-ip.org
Whole thread Raw
In response to Re: Re: starting to review the Extend NOT NULL representation to pg_constraint patch  (Bernd Helmle <mailings@oopsware.de>)
Responses Re: Re: starting to review the Extend NOT NULL representation to pg_constraint patch
List pgsql-hackers
Excerpts from Bernd Helmle's message of jue jun 16 14:30:48 -0400 2011:
> 
> --On 16. Juni 2011 13:25:05 -0400 Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 
> > Possible solution is to leave bootstrap's behavior alone, and have a
> > step during initdb's post-bootstrap stuff that creates a matching
> > pg_constraint row for every pg_attribute entry that's marked attnotnull.
> 
> +1 for this idea. I never came to an end about this because i didn't have any 
> clue how to do it efficiently.

Okay, I have done it this way -- adding one more fixup function to
initdb is very easy.  I only wish that the ending \n in the query to
initdb would be optional -- it took me a while to realize that if you
omit it, the query doesn't get run at all.  Oh well.

-- 
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: POSIX shared memory patch status
Next
From: Alvaro Herrera
Date:
Subject: Re: procpid?