Search Postgresql Archives

Re: returns 0 row from plpgsql function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2010/3/20 zhong ming wu <mr.z.m.wu@xxxxxxxxx>:
> Dear List
>
> I use plpgsql function as a postfix mailserver look-up table.  For
> example to look up virtual email address.
> If I don't host this email address, then the function returns null.
> Because it's a 1 row of null value postfix logs a warning message.
> Although it's harmless in that postfix takes no further action to
> deliver mail, these warning messages fill up log table.
>
> How can I return 0 row from plpgsql function?

create or replace function func(...)
returns setof tablename as $$
begin
  return;
end;
$$ language plpgsql;

select * from func(..);

regards
Pavel Stehule
>
> Thanks
>
> mr.wu
>
> --
> Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux