This is a discussion on Re: Postgres Function in plpgsql, returning null results to Postfix within the mailing.postfix.users forums, part of the Mail Servers and Related category; On 5/24/05, Simon Waters <simonw@zynet.net> wrote: > What is the correct syntax for returning ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
On 5/24/05, Simon Waters <simonw@zynet.net> wrote:
> What is the correct syntax for returning a null or empty result? >=20 > i.e. "RETURN NULL;" creates a one row, one column, result by the looks of= it, > which Postfix doesn't like. >=20 > I'm currently doing the virtual_alias_map but I assume the answer is gene= ric? >=20 Hi Simon, I'm currently doing sender_canonical_maps with a plpgsql function= .. My function return, is "virtual_address", a type I have created. CREATE TYPE "public"."virtual_address" AS ( "address" VARCHAR ); ### Then in the function, I use: ..... scanonical virtual_adress; ..... ### and for returning a null result when no sender canonical is found : .... vaddress.address:=3DNULL; RETURN vaddress; .... It works perfect in this way. --=20 Jota Omella Developers Corp. http://planetas.net |