From 9f9aecbb3f4234e0893a7a8eed0a3c65f3f9ecf3 Mon Sep 17 00:00:00 2001 From: Karl Horky Date: Mon, 5 Feb 2024 11:58:53 +0100 Subject: [PATCH] Add primary key, generated column reserved phrases --- src/languages/postgresql/postgresql.formatter.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/languages/postgresql/postgresql.formatter.ts b/src/languages/postgresql/postgresql.formatter.ts index c120750398..991d94a422 100644 --- a/src/languages/postgresql/postgresql.formatter.ts +++ b/src/languages/postgresql/postgresql.formatter.ts @@ -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