From: | alla(at)sergey(dot)com (Alla) |
---|---|
To: | pgsql-general(at)postgresql(dot)org(dot)pgsql-sql(at)postgresql(dot)org |
Subject: | Function returning record |
Date: | 2001-06-07 18:53:22 |
Message-ID: | 9275d56e.0106071053.2f5d8d8f@posting.google.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-sql |
Is it possible in PostgreSQL to write a function that would return a
record type.
What I need is something like this:
create function my_func(varchar)
return record as '
declare
my_rec record;
begin
select null as field1, null as field2
into my_rec;
.... some processing to populate the actual values of the record
return my_rec;
end;
' LANGUAGE 'plpgsql';
I get the following when I try to compile this:
NOTICE: ProcedureCreate: return type 'record' is only a shell
and following when I try to execute it (even though I am not sure how
to execute this at all);
ERROR: fmgr_info: function 0: cache lookup failed
Please help.
Thanks a lot in advance
Alla
From | Date | Subject | |
---|---|---|---|
Next Message | The Hermit Hacker | 2001-06-07 18:55:25 | Re: WAS: PostgreSQL Replication Server? IS: Zend comparison chart |
Previous Message | Jason Tishler | 2001-06-07 18:23:29 | Should Cygwin PostgreSQL contain all header files? |
From | Date | Subject | |
---|---|---|---|
Next Message | Gerald Gutierrez | 2001-06-07 19:05:24 | Re: Are SQL commands "atomic" ? |
Previous Message | Rene Pijlman | 2001-06-07 18:39:29 | Re: UPDATE with concatenate |