Re: Mysterious Bus Error with get_fn_expr_argtype() - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Mysterious Bus Error with get_fn_expr_argtype()
Date
Msg-id 5350.1220331442@sss.pgh.pa.us
Whole thread Raw
In response to Mysterious Bus Error with get_fn_expr_argtype()  ("David E. Wheeler" <david@kineticode.com>)
Responses Re: Mysterious Bus Error with get_fn_expr_argtype()  ("Brendan Jurd" <direvus@gmail.com>)
List pgsql-hackers
"Neil Conway" <neilc@samurai.com> writes:
> On Mon, Sep 1, 2008 at 9:35 PM, Brendan Jurd <direvus@gmail.com> wrote:
>> +1.  I've been using a variation on this theme (it returns the type
>> OID, not a text value) for a couple of years.

> Returning regtype seems like the natural choice.

I was just about to say the same.  Another thought is that you might as
well declare the input type as "any" --- using "anyelement" just causes
the parser to waste a few cycles checking for argument/result type
conflicts that can't exist here.

I don't like gettype() as the function name: it's not particularly
readable and it seems to infringe on application namespace.  It should
be pg_something ... maybe pg_typeof() ?

Oh, another thing: it shouldn't be STRICT.  Nulls have perfectly good
types.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Hitoshi Harada"
Date:
Subject: Re: Window functions patch v04 for the September commit fest
Next
From: "Hitoshi Harada"
Date:
Subject: Re: Window functions patch v04 for the September commit fest