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 CAHyXU0z3TcgS1brfXvDq6EacvzPaAbSOeS3FygiAryq2Tye-zA@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 ?  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
On Thu, May 3, 2012 at 9:44 AM, Andrew Dunstan <andrew@dunslane.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


pgsql-hackers by date:

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