Re: timestamp_in DirectFunctionCall

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: timestamp_in DirectFunctionCall
Дата
Msg-id 7652.1285961108@sss.pgh.pa.us
обсуждение исходный текст
Ответ на timestamp_in DirectFunctionCall  (Marios Vodas <mvodas@gmail.com>)
Список pgsql-hackers
Marios Vodas <mvodas@gmail.com> writes:
> This is how timestamp_in starts, *#ifdef NOT_USED* is a litle bit confusing.
> Datum timestamp_in(PG_FUNCTION_ARGS)
> {
>     char       *str = PG_GETARG_CSTRING(0);

> #ifdef NOT_USED
>     Oid            typelem = PG_GETARG_OID(1);
> #endif
>     int32        typmod = PG_GETARG_INT32(2);

The ifdef is just to document that timestamp_in is ignoring an input
function's standard second argument.

Personally I'd pass -1 for the third argument rather than hard-wiring
a specific value.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: wip: functions median and percentile
Следующее
От: Robert Haas
Дата:
Сообщение: Re: patch: tsearch - some memory diet