Pulling data from a constraint def - Mailing list pgsql-general

From Gauthier, Dave
Subject Pulling data from a constraint def
Date
Msg-id 482E80323A35A54498B8B70FF2B8798004586FA50C@azsmsx504.amr.corp.intel.com
Whole thread Raw
Responses Re: Pulling data from a constraint def
Re: Pulling data from a constraint def
Re: Pulling data from a constraint def
List pgsql-general

Hi:

 

I have a constraint defined on a table....

 

constraint design_style_is_invalid check (design_style in ('rls','sdp','rf','ssa','rom','rpt','analog','sdprpt','clkdist','global')),

 

Is there a way to get the valid values in the list from the metadata somehow?  Specifically, when someone hits this constraint, I want to not oonly tell them they entered an invalid value, but give them the list of valid choices at the same time.

 

I’d rather not put these in a table and implement with a foreogn key constraint for performance reasons. (Does that make sense?)

 

-dave

pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: Run Vacuum Through JDBC
Next
From: Josh Kupershmidt
Date:
Subject: Re: Pulling data from a constraint def