Re: Mysterious Bus Error with get_fn_expr_argtype()
От | Tom Lane |
---|---|
Тема | Re: Mysterious Bus Error with get_fn_expr_argtype() |
Дата | |
Msg-id | 5350.1220331442@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Mysterious Bus Error with get_fn_expr_argtype() ("David E. Wheeler" <david@kineticode.com>) |
Ответы |
Re: Mysterious Bus Error with get_fn_expr_argtype()
|
Список | 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 по дате отправления: