Re: Constraint using a SQL function executed during SELECT - Mailing list pgsql-general

From Jim Nasby
Subject Re: Constraint using a SQL function executed during SELECT
Date
Msg-id ff241c0f-b85b-837e-46cf-a6403ff0340f@BlueTreble.com
Whole thread Raw
In response to Constraint using a SQL function executed during SELECT  ("Cyril B." <cbay@excellency.fr>)
Responses Re: Constraint using a SQL function executed during SELECT  ("Cyril B." <cbay@excellency.fr>)
List pgsql-general
On 7/19/16 7:43 AM, Cyril B. wrote:
> Hello,
>
> Is there a way to execute a SELECT on a table having a constraint that
> uses a non-working SQL function?
...
> ALTER TABLE ONLY t1 ADD CONSTRAINT c EXCLUDE (id WITH =) WHERE ((f(id)
> IS NOT TRUE));
...
> ERROR:  relation "rename_me.t2" does not exist
...
> CONTEXT:  SQL function "f" during inlining

In this example, you should be able to avoid that by setting
constraint_exclusion=off.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)   mobile: 512-569-9461


pgsql-general by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: MediaWiki + PostgreSQL is not ready for production?
Next
From: "Cyril B."
Date:
Subject: Re: Constraint using a SQL function executed during SELECT