Re: Pulling data from a constraint def

Поиск
Список
Период
Сортировка
От A. Kretschmer
Тема Re: Pulling data from a constraint def
Дата
Msg-id 20100512052331.GA20181@a-kretschmer.de
обсуждение исходный текст
Ответ на Pulling data from a constraint def  ("Gauthier, Dave" <dave.gauthier@intel.com>)
Список 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 по дате отправления:

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: Pulling data from a constraint def
Следующее
От: Mike Christensen
Дата:
Сообщение: Weird unique constraint