Returns the given string suitably quoted to be used as a string literal in an SQL statement string; or, if the argument is null, returns NULL.
Signatures & examples
quote_nullable ( text ) → text
Returns the given string suitably quoted to be used as a string literal in an SQL statement string; or, if the argument is null, returns NULL. Embedded single-quotes and backslashes are properly doubled. See also Example 41.1.
quote_nullable(NULL) → NULL
quote_nullable ( anyelement ) → text
Converts the given value to text and then quotes it as a literal; or, if the argument is null, returns NULL. Embedded single-quotes and backslashes are properly doubled.