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

From Merlin Moncure
Subject Re: How hard would it be to support LIKE in return declaration of generic record function calls ?
Date
Msg-id CAHyXU0xDM_N-vV-DnDGtmvNkb1W=199qRoc4=S69LY=-S0fk8Q@mail.gmail.com
Whole thread Raw
In response to Re: How hard would it be to support LIKE in return declaration of generic record function calls ?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thu, May 3, 2012 at 10:12 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Maybe some keyword can help to us. What do you think about new
>> operator TYPE that can returns regtype value and can be used together
>> with polymorphic functions.
>
> Doesn't have any more attraction for me than the proposed LIKE
> extension; that will have the same results and it's at least traceable
> to SQL-standard notations.

no it won't (unless I'm being completely obtuse in addition to being
repetitive): LIKE only works when you treat your function call as a
table expression: FROM func() AS ...

that's fine, but converting-from-json functions will want to be able
to be called anywhere a single value returning function would be
normally called.  hstore/populate_record trick allows this, so it's
not apples to apples.

merlin


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Advisory locks seem rather broken
Next
From: Peter Eisentraut
Date:
Subject: Re: remove dead ports?