Re: Postgres Function in plpgsql, returning null results to Postfix

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 ...


Go Back   Usenet Forums > Mail Servers and Related > mailing.postfix.users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-24-2005
Javier Omella
 
Posts: n/a
Default Re: Postgres Function in plpgsql, returning null results to Postfix

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
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 05:15 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0