PostgreSQL QUOTE IDENT Function

Education is not limited to just classrooms. It can be gained anytime, anywhere... - Ravi Ranjan (M.Tech-NIT)

PostgreSQL QUOTE_IDENT() function

QUOTE_IDENT() function

The PostgreSQL quote_ident function is used to make a given string with suitably double quoted, so as it can be used like an identifier in an SQL statement string if required.

Syntax :

pg_client_encoding (string)

PostgreSQL Version : 9.3

Pictorial Presentation of PostgreSQL QUOTE_IDENT() function

 

Example : PostgreSQL QUOTE_IDENT() function :

In the example below, the quote_ident function makes the given string with suitably double quoted.

SELECT quote_ident('SELECT * FROM employee');

Output :

       quote_ident
--------------------------
 "SELECT * FROM employee"
(1 row)