Re: US Telephone Number Type

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Karen Hill <karen_hill22(at)yahoo(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: US Telephone Number Type
Date: 2006-07-11 05:27:49
Message-ID: 20060711052749.GA32706@surnet.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:
> "Karen Hill" <karen_hill22(at)yahoo(dot)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.

Is bit-level memory access the actual problem? I would think that at
least PL/Perl can offer that pretty easily using pack() or something
like that. Not that I've actually tried using it.

But I think the main problem may be getting our calling conventions
right. I mean, how would you do a PG_GETARG_BOOL() or stuff like that?
Maybe if we offered PG_GETARG_DATUM and PG_RETURN_DATUM equivalents in
PL/Perl we could offer I/O functions there.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Christian Rengstl 2006-07-11 07:24:06 Re: Problem with COPY
Previous Message A. Kretschmer 2006-07-11 05:09:45 Re: A function which returns all rolname from pg_roles.