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: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, 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 14:56:57
Message-ID: CAHyXU0z3TcgS1brfXvDq6EacvzPaAbSOeS3FygiAryq2Tye-zA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, May 3, 2012 at 9:44 AM, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
> Why would you always need FROM?

that was coming from Hannu's original example:
insert into test2
select * from json_to_record(jrec json) as (like test2);

how do you work it so you can call:
select json_to_record(jrec json) as (like test2);
select json_to_array(jrec_json) as ??

>    create type new_type as (like old_type, extra text);

sure, that would be great on it's own merits.

merlin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2012-05-03 14:58:12 Re: "unexpected EOF" messages
Previous Message Tom Lane 2012-05-03 14:53:32 Re: "unexpected EOF" messages