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;