PostgreSQL QUOTE NULLABLE
From w3cyberlearnings
Contents |
Postgresql quote_nullable
Embeded a single quote and proper backslashes for a given string to use as a string literal in an SQL statement. When it is null, it return NULL.
Syntax quote_nullable
quote_nullable(string)
Note
This function is similar to the Quote_literal() function.
Example 1
postgres=# SELECT quote_nullable(NULL); quote_nullable ---------------- NULL (1 row)
Example 2
postgres=# SELECT quote_nullable(47.35); quote_nullable ---------------- '47.35' (1 row)
Example 3
postgres=# SELECT quote_nullable('Bob Maat'); quote_nullable ---------------- 'Bob Maat' (1 row)
Related Links
- quote_nullable
- regexp_matches
- regexp_replace
- regexp_split_to_array
- regexp_split_to_table