Re: Is it possible return any value other than 'OPAQUE' - Mailing list pgsql-admin

From Sean Chittenden
Subject Re: Is it possible return any value other than 'OPAQUE'
Date
Msg-id 20020913170845.GQ7103@perrin.int.nxad.com
Whole thread Raw
In response to Is it possible return any value other than 'OPAQUE'  ("shreedhar" <shreedhar@lucidindia.net>)
List pgsql-admin
> 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

pgsql-admin by date:

Previous
From: "shreedhar"
Date:
Subject: Is it possible return any value other than 'OPAQUE'
Next
From: Naomi Walker
Date:
Subject: Monitoring Locks in Databases