Hello, All!
I've tried to do following:
create table test ( id BIGSERIAL NOT NULL, constraint pk_test primary
key (id),
val BIGINT NOT NULL
);
create or replace function get_rec (in p_id test.id%TYPE) returns test
%ROWTYPE as $$
declare
retval test%ROWTYPE;
begin
select * from test into retval
where id = $1;
return retval;
end;
$$ language 'plpgsql';
I got an error message: "sysntax error at or near ROWTYPE"
Is it possible to return ONE record that has the same type as table?
I Oracle it is work fine....
Any Ideas or work around?
Thanks.
--
Sent via pgsql-sql mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql