Skip to content

Commit 89ad62f

Browse files
committed
Format PostgreSQL DROP TIGGER .. ON ..
1 parent d733f3e commit 89ad62f

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/syntax/trigger.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,11 @@ export const triggerMap: CstToDocMap<AllTriggerNodes> = {
5555
),
5656

5757
drop_trigger_stmt: (print) =>
58-
print.spaced(["dropTriggerKw", "ifExistsKw", "trigger", "behaviorKw"]),
58+
print.spaced([
59+
"dropTriggerKw",
60+
"ifExistsKw",
61+
"trigger",
62+
"target",
63+
"behaviorKw",
64+
]),
5965
};

test/ddl/trigger.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ describe("trigger", () => {
189189
});
190190

191191
it(`formats CASCADE/RESTRICT`, async () => {
192-
await testPostgresql(`DROP TRIGGER my_trigger CASCADE`);
192+
await testPostgresql(`DROP TRIGGER my_trigger ON my_table CASCADE`);
193193
});
194194
});
195195
});

0 commit comments

Comments
 (0)