Calling Functions With OUT paramaters

From: David Greco <David_Greco(at)harte-hanks(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Calling Functions With OUT paramaters
Date: 2012-02-29 15:51:56
Message-ID: CDFA9340E95A764E9366B4EDF3A431250108B64E29F0@VA3DIAXVS091.RED001.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message McGehee, Robert 2012-02-29 16:12:58 Arbitrary and mixed data types in function
Previous Message Tom Lane 2012-02-29 15:50:33 Re: Client encoding not the same as the db encoding