Re: Function x returns opaque in error typeidTypeRelid

From: Richard Huxton <dev(at)archonet(dot)com>
To: Sondaar Roelof <roelof(dot)sondaar(at)scania(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Function x returns opaque in error typeidTypeRelid
Date: 2001-03-31 07:41:59
Message-ID: 3AC58A47.71A4978C@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Sondaar Roelof wrote:
>
> 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 ?
>
> dhcp=# create function lalala() returns opaque as '
> dhcp=#
> dhcp=# select lalala();
> ERROR: typeidTypeRelid: Invalid type - oid = 0

I believe you can only use opaque from triggers - if you call a function
with select, it not unreasonably expects to have data returned.

In the absence of anything relevent I tend to return either 1 or
'succeeded' or similar.

- Richard Huxton

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Najm Hashmi 2001-03-31 15:59:50 Error on Drop table
Previous Message Richard Huxton 2001-03-31 07:35:35 Re: date_part bug?