From c1d2f6455833f586340560859d4577b6ca52fef4 Mon Sep 17 00:00:00 2001 From: jbranchaud Date: Thu, 7 Sep 2023 12:33:30 -0500 Subject: [PATCH] Fix lowercasing error in trigger TIL --- postgres/use-a-trigger-to-mirror-inserts-to-another-table.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postgres/use-a-trigger-to-mirror-inserts-to-another-table.md b/postgres/use-a-trigger-to-mirror-inserts-to-another-table.md index ec57c2f..f5bf2ef 100644 --- a/postgres/use-a-trigger-to-mirror-inserts-to-another-table.md +++ b/postgres/use-a-trigger-to-mirror-inserts-to-another-table.md @@ -13,7 +13,7 @@ inserting the newly inserted rows into `another_table`. create or replace function mirror_table_to_another_table() returns trigger as $mirrored_table$ begin - if (TG_OP = 'insert') then + if (TG_OP = 'INSERT') then insert into another_table select * from new_table; end if;