Re: Domain check constraint not honored? - Mailing list pgsql-general

From Jim Nasby
Subject Re: Domain check constraint not honored?
Date
Msg-id 56337655.3060500@BlueTreble.com
Whole thread Raw
In response to Re: Domain check constraint not honored?  (Eric Schwarzenbach <subscriber@blackbrook.org>)
Responses Re: Domain check constraint not honored?
List pgsql-general
On 10/29/15 5:29 PM, Eric Schwarzenbach wrote:
> 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]+$')

Have you looked at using int[]? It wouldn't be hard to go between that
and the string representation using string_to_array() and
array_to_string(). There's also a chance that eventually you'd be able
to do FKs on it.
--
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


pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: ftell mismatch with expected position
Next
From: Dane Foster
Date:
Subject: Re: mysql_fdw trouble