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

From A. Kretschmer
Subject Re: Pulling data from a constraint def
Date
Msg-id 20100512052331.GA20181@a-kretschmer.de
Whole thread Raw
In response to Pulling data from a constraint def  ("Gauthier, Dave" <dave.gauthier@intel.com>)
List pgsql-general
In response to Gauthier, Dave :
> 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?

Sure, read the answer from Josh Kupershmidt. But keep in mind, internal
tables maybe changed in the next version -> your code isn't portable.


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

If i were you, i would use exactly this way.


Regards, Andreas
--
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG: 0x31720C99, 1006 CCB4 A326 1D42 6431  2EB0 389D 1DC2 3172 0C99

pgsql-general by date:

Previous
From: David Fetter
Date:
Subject: Re: Pulling data from a constraint def
Next
From: Mike Christensen
Date:
Subject: Weird unique constraint