Skip site navigation (1) Skip section navigation (2)

Re: How hard would it be to support LIKE in return declaration of generic record function calls ?

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Hannu Krosing <hannu(at)2ndquadrant(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: How hard would it be to support LIKE in return declaration of generic record function calls ?
Date: 2012-05-03 13:31:17
Message-ID: CAHyXU0yuZhaHOmTk+LZyR__jNXy3zNAhZk4EiFoVX+r98miLpg@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Thu, May 3, 2012 at 7:13 AM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
> Hello
>
>> (1 row)
>>
>> This works the same indeed, just seems to be a hack, though a cool
>> one :)

Yeah -- the syntax isn't great, but IMO it's more generally usable
than what you're proposing because it's a scalar returning function
not a table expression.  Another point is that the proposed 'like'
syntax (which I still think is great, just maybe not for conversions
from json) seems wedded to record types.  The hstore trick should be
able to take a foo[], set it all up and return it.  How would that
work with like?

> few years back I proposed "anytypename" type
>
> with this feature, you can has some clean and more readable call
>
> SELECT * FROM populate_record(test, ...)

that would be great IMO.

merlin

In response to

Responses

pgsql-hackers by date

Next:From: Pavel StehuleDate: 2012-05-03 13:43:23
Subject: Re: How hard would it be to support LIKE in return declaration of generic record function calls ?
Previous:From: Merlin MoncureDate: 2012-05-03 13:19:01
Subject: Re: Temporary tables under hot standby

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group