Skip to content

Commit

Permalink
Add primary key, generated column to PostgreSQL reserved phrases (#714)
Browse files Browse the repository at this point in the history
Add reserved phrases for PostgreSQL for primary keys and generated columns.
  • Loading branch information
nene committed Feb 5, 2024
2 parents d5a6c7a + 9f9aecb commit 3483499
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/languages/postgresql/postgresql.formatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,8 @@ const reservedJoins = expandPhrases([
]);

const reservedPhrases = expandPhrases([
'PRIMARY KEY',
'GENERATED {ALWAYS | BY DEFAULT} AS IDENTITY',
'ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]',
'{ROWS | RANGE | GROUPS} BETWEEN',
// https://www.postgresql.org/docs/current/datatype-datetime.html
Expand Down

0 comments on commit 3483499

Please sign in to comment.