On 7 Nov 2012, at 6:33, Yvon Thoraval wrote:

> CREATE FUNCTION has_infos(text) RETURNS boolean AS 'select 
> character_length($1) > 0;' LANGUAGE SQL IMMUTABLE RETURNS FALSE ON NULL INPUT;

Try:
CREATE FUNCTION has_infos(text) RETURNS boolean AS 'select 
coalesce(character_length($1) > 0, false);' LANGUAGE SQL IMMUTABLE;

Alban Hertroys

--
If you can't see the forest for the trees,
cut the trees and you'll find there is no forest.



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

Reply via email to