Re: US Telephone Number Type - Mailing list pgsql-general

From Tom Lane
Subject Re: US Telephone Number Type
Date
Msg-id 8237.1152589609@sss.pgh.pa.us
Whole thread Raw
In response to Re: US Telephone Number Type  ("Karen Hill" <karen_hill22@yahoo.com>)
Responses Re: US Telephone Number Type  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-general
"Karen Hill" <karen_hill22@yahoo.com> writes:
> I did a quick google and someone mentioned that input and output
> functions need to be written in C.  Is that still the case?

Yeah, pretty much.  The main problem is that such functions need to deal
with whatever physical on-disk format you've chosen for the datatype,
and most of our PLs don't offer bit-level memory access.

If C functions seem like more work than you want to go to for this
problem, I concur with using a domain over text with a regex check
constraint ...

            regards, tom lane

pgsql-general by date:

Previous
From: "Karen Hill"
Date:
Subject: A function which returns all rolname from pg_roles.
Next
From: Joe Conway
Date:
Subject: Re: A function which returns all rolname from pg_roles.