Markus Bertheau =?UTF-8?Q?=E2=98=AD?= <twanger(at)bluetwanger(dot)de> writes:
> Maybe quote_* is not the right name, but the functionality is needed.
I don't think so --- at least not in plpgsql, which can do this already.
Just assign the value to a text variable and then use quote_literal.
regards, tom lane