test;
END $$ LANGUAGE PLPGSQL VOLATILE;
Pavel and Merlin, thank you!
CN
> -Original Message-
> From: Merlin Moncure
> Sent: Fri, Jan 13 2012 01:13:09 CST
> To: Pavel Stehule
> Subject: Re: [GENERAL] unnest array of row type
>
> On Thu, Jan 12, 2012 at 8:47 AM
2012/1/12 Merlin Moncure :
> On Thu, Jan 12, 2012 at 8:47 AM, Pavel Stehule
> wrote:
>> 2012/1/12 :
>>> Hi!
>>>
>>> CREATE TYPE my_row_type AS (c1 SMALLINT,c2 TEXT);
>>>
>>> CREATE FUNCTION tmp_get_c1(my_row_type) RETURNS SMALLINT AS 'SELECT $1.c1'
>>> LANGUAGE SQL;
>>>
>>> CREATE FUNCTION tmp_
On Thu, Jan 12, 2012 at 8:47 AM, Pavel Stehule wrote:
> 2012/1/12 :
>> Hi!
>>
>> CREATE TYPE my_row_type AS (c1 SMALLINT,c2 TEXT);
>>
>> CREATE FUNCTION tmp_get_c1(my_row_type) RETURNS SMALLINT AS 'SELECT $1.c1'
>> LANGUAGE SQL;
>>
>> CREATE FUNCTION tmp_get_c2(my_row_type) RETURNS TEXT AS 'SELE
2012/1/12 :
> Hi!
>
> CREATE TYPE my_row_type AS (c1 SMALLINT,c2 TEXT);
>
> CREATE FUNCTION tmp_get_c1(my_row_type) RETURNS SMALLINT AS 'SELECT $1.c1'
> LANGUAGE SQL;
>
> CREATE FUNCTION tmp_get_c2(my_row_type) RETURNS TEXT AS 'SELECT $1.c2'
> LANGUAGE SQL;
>
> CREATE TABLE test (c1 SMALLINT,c2
Hi!
CREATE TYPE my_row_type AS (c1 SMALLINT,c2 TEXT);
CREATE FUNCTION tmp_get_c1(my_row_type) RETURNS SMALLINT AS 'SELECT $1.c1'
LANGUAGE SQL;
CREATE FUNCTION tmp_get_c2(my_row_type) RETURNS TEXT AS 'SELECT $1.c2' LANGUAGE
SQL;
CREATE TABLE test (c1 SMALLINT,c2 TEXT,c3 TEXT);
INSERT INTO tes