Re: timestamp_in DirectFunctionCall

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Marios Vodas <mvodas(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: timestamp_in DirectFunctionCall
Date: 2010-10-01 19:25:08
Message-ID: 7652.1285961108@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Marios Vodas <mvodas(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-10-01 19:46:32 Re: patch: tsearch - some memory diet
Previous Message Pavel Stehule 2010-10-01 19:17:08 Re: wip: functions median and percentile