Re: WIP: to_char, support for EEEE format - Mailing list pgsql-hackers

From Brendan Jurd
Subject Re: WIP: to_char, support for EEEE format
Date
Msg-id 37ed240d0908100819l70aab542u25acee796e85b067@mail.gmail.com
Whole thread Raw
In response to Re: WIP: to_char, support for EEEE format  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: WIP: to_char, support for EEEE format  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
2009/8/11 Tom Lane <tgl@sss.pgh.pa.us>:
> Alvaro Herrera <alvherre@commandprompt.com> writes:
>> I wondered if it should just return char *.  If we want to have this
>> functionality as its own fmgr-blessed function, shouldn't it return
>> text instead of cstring?
>
> If we expose it at fmgr level it should definitely not return cstring.
> However, I wasn't foreseeing doing that --- does the submitted patch
> expose it?
>

Sorry, I'm a little hazy on the terminology here.  If by "expose it at
fmgr level" you mean did I add it to pg_proc, then no, I didn't.

The function is declared in builtins.h as "extern Datum
numeric_out_sci(PG_FUNCTION_ARGS);", and called from formatting.c
using the  DirectFunctionCall arrangement.

numeric_out_sci() returns using PG_RETURN_CSTRING, same as numeric_out does.

If this is the wrong way to expose the function, please let me know
and I'll happily fix it.

Cheers,
BJ


pgsql-hackers by date:

Previous
From: Dave Page
Date:
Subject: Re: [PATCH] "could not reattach to shared memory" on Windows
Next
From: Andrew Dunstan
Date:
Subject: Re: GRANT ON ALL IN schema