Re: bug error message constraint "con_item_id_costelement" for table "costs" does not exist SQL state: 42704

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: joel(dot)traf(at)magwerks(dot)com
Cc: "Vitaly Burovoy" <vitaly(dot)burovoy(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: bug error message constraint "con_item_id_costelement" for table "costs" does not exist SQL state: 42704
Date: 2016-07-28 17:34:24
Message-ID: 23730.1469727264@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

joel(dot)traf(at)magwerks(dot)com writes:
> My i humbly suggest adding notes to the create table clone ( original
> including all).

Done at
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=46b773d4fe0f0c880a1073cb5366efa02efa8ef8

> Also suggest adding the same comment to the Insert on conflict
> stating. Tables that are cloned with (including all ) the constraint
> is not automatically recreated with the same name so the constraint
> needs to be manually re-created with that specific name for the temp
> table.

I think that's overkill, considering that LIKE is such a minor feature
that it's not even mentioned anywhere except this one part of the
CREATE TABLE man page.

> Additionally could throw a notice that when a table is cloned with the
> copy indexes or constraints, stating names are not preserved and may
> cause issues with Upsert on conflict.

And that's right around the bend. I realize you're annoyed at the moment,
but nannying NOTICE messages are something nobody likes for long.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Jordan Gigov 2016-07-28 19:54:33 Re: BUG #14268: NULL parameter conversion
Previous Message joel.traf 2016-07-28 17:21:32 Re: bug error message constraint "con_item_id_costelement" for table "costs" does not exist SQL state: 42704