Re: [BUGS] BUG #14834: quote_literal and composite types, different behaviour between sql and plpgsql - Mailing list pgsql-bugs

From Tom Lane
Subject Re: [BUGS] BUG #14834: quote_literal and composite types, different behaviour between sql and plpgsql
Date
Msg-id 1328.1506620265@sss.pgh.pa.us
Whole thread Raw
In response to [BUGS] BUG #14834: quote_literal and composite types,different behaviour between sql and plpgsql  (dvd@gnx.it)
List pgsql-bugs
dvd@gnx.it writes:
> I found that `quote_literal` behaviour is wrong when used in a plpgsql
> function over a null composite type, let me show:

No, there's nothing wrong with quote_literal.  Your example is showing
that plpgsql converts a "null" composite value into a row-of-nulls,
when dealing with a variable of a named composite type (in this case,
the variable is the parameter "val").  This is arguably wrong, but plpgsql
has been doing that for a mighty long time so people are hesitant to
change it.
        regards, tom lane


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

pgsql-bugs by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: [BUGS] BUG #14835: Postgres crashed
Next
From: aistrong.hs@gmail.com
Date:
Subject: [BUGS] BUG #14836: Is there an option to change and run isolation level onlyfor a single statement as in DB2