Re: Calling Functions With OUT paramaters

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: David Greco <David_Greco(at)harte-hanks(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Calling Functions With OUT paramaters
Date: 2012-02-29 19:07:16
Message-ID: 4F4E7764.9040803@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 29/02/2012 15:51, David Greco wrote:
> I have a function definited as such:
>
> CREATE OR REPLACE FUNCTION address_pkg.parse_zip(IN cpostal character
> varying, OUT czip character varying, OUT czip4 character varying)
> LANGUAGE plpgsql;
>
> How does one call this from another plpgsql function? Currently, I am
> using something of the form:
>
> SELECT * INTO cZip, cZip4 FROM Address_pkg.Parse_Zip(postal_code);
>
> But, I am not a big fan of this. Is there another way?

What's wrong with that?

But to answer your question, I don't think there is... within pl/pgsql
you have to SELECT INTO, or if you want to discard the result then you
do PERFORM instead.

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod(at)iol(dot)ie

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2012-02-29 19:14:19 Re: Privilege on schema 'public' not revokable
Previous Message David Johnston 2012-02-29 19:06:37 Re: Privilege on schema 'public' not revokable