pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Sean Chittenden <sean@chittenden.org>
To: shreedhar <shreedhar@lucidindia.net>
Cc: Postgres <pgsql-admin@postgresql.org>
Subject: Re: Is it possible return any value other than 'OPAQUE'
Date: Fri, 13 Sep 2002 10:08:45 -0700
Message-ID: <20020913170845.GQ7103@perrin.int.nxad.com> (raw)
In-Reply-To: <000d01c25b1e$fdb550a0$1201a8c0@a4005>
References: <000d01c25b1e$fdb550a0$1201a8c0@a4005>

> Is it possible return any value other than 'OPAQUE', If we can
> return how it can be retreived.
> 
> CREATE FUNCTION emp_stamp () RETURNS OPAQUE AS
>     BEGIN
> 
>     END;
> ' LANGUAGE 'plpgsql';

For functions that you need to have return a value, yes:

CREATE FUNCTION uga() RETURNS INT AS
BEGIN
  RETURN(5);
END:
' LANGUAGE 'plpgsql';

In 7.3 triggers should return type TRIGGER and not OPAQUE.  This will
still work, but will issue a warning.  -sc

-- 
Sean Chittenden



view thread (2+ messages)

Message-ID: <20020913170845.GQ7103@perrin.int.nxad.com>
Permalink:  ../20020913170845.GQ7103@perrin.int.nxad.com/
Also on:    postgresql.org/message-id/20020913170845.GQ7103@perrin.int.nxad.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-admin@postgresql.org
  Cc: sean@chittenden.org, shreedhar@lucidindia.net
  Subject: Re: Is it possible return any value other than 'OPAQUE'
  In-Reply-To: <20020913170845.GQ7103@perrin.int.nxad.com>
  References: <000d01c25b1e$fdb550a0$1201a8c0@a4005> <20020913170845.GQ7103@perrin.int.nxad.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