Function x returns opaque in error typeidTypeRelid

From: Sondaar Roelof <roelof(dot)sondaar(at)scania(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Function x returns opaque in error typeidTypeRelid
Date: 2001-03-28 08:29:48
Message-ID: F28A2B83DFE0D411A7B3006097487147468FEE@sv7007.scania.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello,

I am a bit at a loss here.
If I create a function which returns something it works fine.
If it returns opaque I get the following: ERROR: typeidTypeRelid: Invalid
type - oid = 0
What am I doing wrong ?

Thanks in advance.
Best regards,
Roelof Sondaar

dhcp=# drop function lalala();
DROP
dhcp=# create function lalala() returns opaque as '
dhcp'# declare
dhcp'# sname text;
dhcp'# begin
dhcp'# sname:= ''lalala'';
dhcp'# end;
dhcp'# ' language 'plpgsql';
CREATE
dhcp=#
dhcp=# select lalala();
ERROR: typeidTypeRelid: Invalid type - oid = 0
dhcp=#
dhcp=# drop function lalala2();
DROP
dhcp=# create function lalala2() returns text as '
dhcp'# declare
dhcp'# sname text;
dhcp'# begin
dhcp'# sname:= ''lalala'';
dhcp'# return sname;
dhcp'# end;
dhcp'# ' language 'plpgsql';
CREATE
dhcp=#
dhcp=# select lalala2();
lalala2
---------
lalala
(1 row)

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message chris Gnther 2001-03-28 09:50:51 DELETE FROM fails with error
Previous Message Marcin Kowalski 2001-03-28 07:37:21 Re: pg_dump potential bug