Search Postgresql Archives

Re: Transform_Null_Equals does not work in Functions

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

 



Daniel Schuchardt <d.schuchardt@xxxxxxxxxxxxx> writes:
> CREATE OR REPLACE FUNCTION show_transform_problem(with_transform BOOL) 
> RETURNS BOOL AS $$
> DECLARE result BOOL;
> BEGIN
>   IF with_transform THEN
>       SET transform_null_equals TO ON;
>   END IF;
>   RESULT:=NULL=1;
>   SET transform_null_equals TO OFF;
>   RETURN result;
> END $$ LANGUAGE plpgsql;

That isn't going to work unless you EXECUTE the target statement, so
that it's re-parsed from scratch every time.

It's highly unlikely that transform_null_equals will solve your problem
anyway.  Find a more standards-compliant way.

			regards, tom lane

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