quote_all_identifiers

A GUC parameter determining whether PostgreSQL should quote all identifiers

quote_all_identifiers is a GUC parameter determining whether PostgreSQL should quote all identifiers, even if they are not (currently) keywords.

quote_all_identifiers was added in PostgreSQL 9.1.

Default

The default value for quote_all_identifiers is: off.

Change history

Examples

postgres=# CREATE VIEW bar AS SELECT * FROM foo;
CREATE VIEW

postgres=# SELECT pg_get_viewdef('bar');
 pg_get_viewdef  
-----------------
  SELECT foo.id,+
     foo.val    +
    FROM foo;
(1 row)

postgres=# SET quote_all_identifiers TO ON;
SET

postgres=# SELECT pg_get_viewdef('bar');
   pg_get_viewdef    
---------------------
  SELECT "foo"."id",+
     "foo"."val"    +
    FROM "foo";
(1 row)

Categories

GUC configuration item