↑↓ select ↵ open ⌫ change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Functions / String Functions And Operators

Returns the given string suitably quoted to be used as an identifier in an SQL statement string.

Reading PG 18current·documented in 25 of 27 versions, 7.3 to 20

Signatures & examples

quote_ident ( text ) → text
Returns the given string suitably quoted to be used as an identifier in an SQL statement string. Quotes are added only if necessary (i.e., if the string contains non-identifier characters or would be case-folded). Embedded quotes are properly doubled. See also Example 41.1.
quote_ident('Foo bar') → "Foo bar"
Version history 14
  1. 16 → 17 changed
  2. 13 → 14 changed
  3. 12 → 13 changed
  4. 11 → 12 changed
  5. 10 → 11 changed
  6. 9.6 → 10 changed
  7. 9.5 → 9.6 changed
  8. 9.2 → 9.3 changed
  9. 8.4 → 9.0 changed
  10. 8.3 → 8.4 changed
  11. 8.2 → 8.3 changed
  12. 8.1 → 8.2 changed
  13. 7.3 → 7.4 changed
  14. 7.2 → 7.3 added

Definition snapshot: b7bd9cda · English manual source