The following bug has been logged on the website:
Bug reference: 14834
Logged by: David Mugnai
Email address: dvd@gnx.it
PostgreSQL version: 9.4.7
Operating system: Linux
Description:
I found that `quote_literal` behaviour is wrong when used in a plpgsql
function over a null composite type, let me show:
create type t as (x text);
create function f(val t default null) returns text as $$select quote_literal(val);
$$ language sql stable;
create function f2(val t default null) returns text as $$
declareo text;
beginselect quote_literal(val) into o;return o;
end
$$ language plpgsql;
dvd@[local]/dvd> select f() union all select f2(); f
--------(null)'()'
(2 rows)
If I do not mistake the both the functions should returns NULL;
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs