pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: Sondaar Roelof <roelof.sondaar@scania.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Function x returns opaque in error typeidTypeRelid
Date: Sat, 31 Mar 2001 08:41:59 +0100
Message-ID: <3AC58A47.71A4978C@archonet.com> (raw)
References: <F28A2B83DFE0D411A7B3006097487147468FEE@sv7007.scania.se>

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



view thread (2+ messages)

Message-ID: <3AC58A47.71A4978C@archonet.com>
Permalink:  ../3AC58A47.71A4978C@archonet.com/
Also on:    postgresql.org/message-id/3AC58A47.71A4978C@archonet.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: dev@archonet.com, roelof.sondaar@scania.com
  Subject: Re: Function x returns opaque in error typeidTypeRelid
  In-Reply-To: <3AC58A47.71A4978C@archonet.com>
  References: <F28A2B83DFE0D411A7B3006097487147468FEE@sv7007.scania.se> <3AC58A47.71A4978C@archonet.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox