Received: from www-uk-05.digiserve.com ([195.97.231.11]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f2V94RK34304 for ; Sat, 31 Mar 2001 04:04:35 -0500 (EST) (envelope-from dev@archonet.com) Received: from mainbox.archonet.com (mwynhau.demon.co.uk [193.237.186.96]) by www-uk-05.digiserve.com (8.9.1/8.9.1) with ESMTP id KAA11998; Sat, 31 Mar 2001 10:05:19 +0100 (BST) Received: from archonet.com (ibook.archonet.com [192.168.1.32]) by mainbox.archonet.com (Postfix) with ESMTP id 23E252A3AE; Sat, 31 Mar 2001 08:42:40 +0100 (BST) Message-ID: <3AC58A47.71A4978C@archonet.com> Date: Sat, 31 Mar 2001 08:41:59 +0100 From: Richard Huxton X-Mailer: Mozilla 4.7C-CCK-MCD {C-UDP; EBM-APPLE} (Macintosh; I; PPC) X-Accept-Language: en MIME-Version: 1.0 To: Sondaar Roelof Cc: pgsql-sql@postgresql.org Subject: Re: Function x returns opaque in error typeidTypeRelid References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200103/657 X-Sequence-Number: 2336 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