On Fri, Oct 12, 2018 at 12:39 PM Alvaro Herrera
<alvherre@2ndquadrant.com> wrote:
> I just realized that the current code to assign constraint names to
> partitions is going against the SQL standard's idea that constraint
> names must be unique within a schema. When a partition is created, the
> foreign key gets exactly the same name as the constraint in the parent
> table.
I guess I don't see the point in trying to do something about this in
the partition case but not any other case. The standard may have a
rule here, but if we don't follow it in general, what benefit do we
get out of trying to sorta follow it in the specific case of
partitions with inherited foreign keys? There's probably quite a bit
of work to do here to fix this properly - I seem to recall some
previous discussion where it didn't seem simple even to ensure that
constraint names were unique within a relation in certain corner
cases.
At any rate, -1 from me for inserting a fix like this between rc1 and final.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company