Skip site navigation (1) Skip section navigation (2)

Re: BUG #5856: pg_attribute.attinhcount is not correct.

From: Noah Misch <noah(at)leadboat(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Naoya Anzai <anzai-naoya(at)mxu(dot)nes(dot)nec(dot)co(dot)jp>,pgsql-hackers(at)postgresql(dot)org
Subject: Re: BUG #5856: pg_attribute.attinhcount is not correct.
Date: 2011-04-01 04:56:29
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugspgsql-hackers
On Thu, Mar 31, 2011 at 11:11:49AM -0400, Robert Haas wrote:
> On Thu, Mar 31, 2011 at 6:06 AM, Noah Misch <noah(at)leadboat(dot)com> wrote:
> >> I think this is a manifestation the same problem mentioned here:
> >>
> >>;a=commit;h=31b6fc06d83c6de3644c8f2921eb7de0eb92fac3
> >>
> >> I believe this requires some refactoring to fix. ?It would be good to do that.
> >
> > The best way I can see is to make ATExecAddColumn more like ATExecDropColumn,
> > ATAddCheckConstraint, and ATExecDropConstraint. ?Namely, recurse at Exec-time
> > rather than Prep-time, and cease recursing when we satisfy the ADD COLUMN with a
> > merge. ?Did you have something else in mind?
> I had exactly what you just said in mind.

Patch attached, then.

> > Incidentally, when we satisfy an ADD COLUMN with a merge, we do not check or
> > update attnotnull:
<details ... what should we do?>

> Not sure.  I think that anything we do here is bound to have some
> corner cases that are not quite right for so long as NOT NULL
> constraints aren't represented in pg_constraint, and it's way too late
> to dredge up that issue again for 9.1.  I'm somewhat inclined to just
> defer fixing it until we get that work committed.


In response to


pgsql-hackers by date

Next:From: Brendan JurdDate: 2011-04-01 05:51:54
Subject: Re: Keywords in pg_hba.conf should be field-specific
Previous:From: Fujii MasaoDate: 2011-04-01 03:12:27
Subject: Re: corner case about replication and shutdown

pgsql-bugs by date

Next:From: John R PierceDate: 2011-04-01 08:17:57
Subject: Re: default password for user postgres
Previous:From: Craig RingerDate: 2011-04-01 03:49:20
Subject: Re: BUG #5939: About bytea

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group