From: | Brendan Jurd <direvus(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Euler Taveira de Oliveira <euler(at)timbira(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: WIP: to_char, support for EEEE format |
Date: | 2009-08-10 15:19:55 |
Message-ID: | 37ed240d0908100819l70aab542u25acee796e85b067@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2009/8/11 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> Alvaro Herrera <alvherre(at)commandprompt(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2009-08-10 15:29:58 | Re: [PATCH] "could not reattach to shared memory" on Windows |
Previous Message | Andrew Dunstan | 2009-08-10 15:19:37 | Re: GRANT ON ALL IN schema |