Re: How hard would it be to support LIKE in return declaration of generic record function calls ? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: How hard would it be to support LIKE in return declaration of generic record function calls ?
Date
Msg-id 23392.1336056647@sss.pgh.pa.us
Whole thread Raw
In response to Re: How hard would it be to support LIKE in return declaration of generic record function calls ?  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: How hard would it be to support LIKE in return declaration of generic record function calls ?
List pgsql-hackers
Pavel Stehule <pavel.stehule@gmail.com> writes:
> 2012/5/3 Tom Lane <tgl@sss.pgh.pa.us>:
>> This notion of "anytypename" is utterly unworkable anyway; there's no
>> way for the parser to know soon enough that a given argument position
>> needs to be read as a type name rather than a normal expression.

> type identifier is same identifier like other - but I have no
> prototype now, so I don't know if there is some trap

No, it isn't, at least not if you have any ambition to support array
types for instance; to say nothing of types whose standard names are
keywords, multiple words, etc.  Even if you were willing to restrict the
feature to only work for simple-identifier type names, the parser would
have thrown an error for failing to find a column by that name, or else
would have misinterpreted the type name as a column name, long before
there is any opportunity to recognize that the argument position is
an "anytypename" argument.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: "unexpected EOF" messages
Next
From: Tom Lane
Date:
Subject: Re: "unexpected EOF" messages