↑↓ select ↵ open ⌫ change scope Open full search

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

Functions / System Information Functions And Operators

pg_get_keywords

Read the PG 18 manual

Returns a set of records describing the SQL keywords recognized by the server.

Reading PG 18current·documented in 19 of 27 versions, 8.4 to 20

Signatures & examples

pg_get_keywords () → setof record ( word text, catcode "char", barelabel boolean, catdesc text, baredesc text )
Returns a set of records describing the SQL keywords recognized by the server. The word column contains the keyword. The catcode column contains a category code: U for an unreserved keyword, C for a keyword that can be a column name, T for a keyword that can be a type or function name, or R for a fully reserved keyword. The barelabel column contains true if the keyword can be used as a “bare” column label in SELECT lists, or false if it can only be used after AS. The catdesc column contains a possibly-localized string describing the keyword's category. The baredesc column contains a possibly-localized string describing the keyword's column label status.
Version history 3
  1. 13 → 14 changed
  2. 12 → 13 changed
  3. 8.3 → 8.4 added

Definition snapshot: b7bd9cda · English manual source