Re: Domain check constraint not honored?

Поиск
Список
Период
Сортировка
От Eric Schwarzenbach
Тема Re: Domain check constraint not honored?
Дата
Msg-id 56329DBB.8060800@blackbrook.org
обсуждение исходный текст
Ответ на Re: Domain check constraint not honored?  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: Domain check constraint not honored?  (Rob Sargent <robjsargent@gmail.com>)
Re: Domain check constraint not honored?  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Domain check constraint not honored?  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Список pgsql-general
On 10/29/2015 03:44 PM, Alvaro Herrera wrote:
> Rob Sargent wrote:
>
>> Also thought I should mention that there is an ip address type if that's
>> what you're trying to accomplish.
> Looking at the domain name, I wonder whether contrib/ltree would be
> helpful.
Very observant! This is indeed part of a hierarchical data solution.
Thanks for the suggestion, but this solution has been in place and
working for a few years already. I'm not positive, but I think I may
have looked at ltree when I first implemented it, but decided against it
in favor of a transitive closure table, augmented with this path for
sorting.
(I do sometimes wonder whether the transitive closure table is worth it
vs just a materialized path.)

I'm just now converting that path to use a custom domain (along with
custom operators) instead of just being a string. (The custom operators
allow the paths to be sorted properly without each segment needing to be
filled with zeros to a fixed length.) (Also FWIW, the latest version of
this regexp is now '^([0-9]+.)*[0-9]+$')



Cheers,

Eric


В списке pgsql-general по дате отправления:

Предыдущее
От: Thomas Kellerer
Дата:
Сообщение: Re: Configure Different Databases on One Server
Следующее
От: "David E. Wheeler"
Дата:
Сообщение: Re: pgxs/config/missing is... missing