Re: [BUGS] BUG #3774: create table like including index doesn't update pg_constraints with primary key - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [BUGS] BUG #3774: create table like including index doesn't update pg_constraints with primary key
Date
Msg-id 29058.1196552812@sss.pgh.pa.us
Whole thread Raw
In response to Re: [BUGS] BUG #3774: create table like including index doesn't update pg_constraints with primary key  (NikhilS <nikkhils@gmail.com>)
Responses Re: [BUGS] BUG #3774: create table like including index doesn't update pg_constraints with primary key  (NikhilS <nikkhils@gmail.com>)
List pgsql-hackers
NikhilS <nikkhils@gmail.com> writes:
> This can be handled by setting index->isconstraint appropriately inside
> generateClonedIndexStmt().

Done.

> The fundamental question though is should we allow primary, unique
> CONSTRAINTS which use the index mechanism just as an implementation to be
> created using the "INCLUDING INDEXES" mechanism.

Yeah, this bizarreness was foreseen and agreed to back when we set up
LIKE INCLUDING CONSTRAINTS the way it was defined (ie, copying only
CHECK constraints and not other things called constraints).  I was never
very thrilled with that definition myself, but it's a bit too late to
revisit it.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Gregory Stark
Date:
Subject: Re: CommandCounterIncrement versus plan caching
Next
From: Andrew Dunstan
Date:
Subject: Re: [PATCHES] Re: [GENERAL] plperl and regexps with accented characters - incompatible?