Skip to content

Commit 43cf8d7

Browse files
committed
add tests for correct schemas and fix naming
1 parent 5a0a2bf commit 43cf8d7

File tree

10 files changed

+444
-3
lines changed

10 files changed

+444
-3
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
DROP TABLE IF EXISTS users_2 CASCADE;
2+
3+
CREATE TABLE users_2 (
4+
id integer not null PRIMARY KEY
5+
);
6+
7+
create or replace function update_updated_at_column ()
8+
returns trigger
9+
language plpgsql
10+
as $function$
11+
begin
12+
new.updated_at = NOW();
13+
return new;
14+
end;
15+
$function$;
16+
17+
-- TODO some kind of flag for disabling static analysis only per statement
18+
-- plpgsql-language-server:disable-static
19+
create trigger update_users_2_modtime -- should raise error
20+
before update on users_2 for each row
21+
execute function update_updated_at_column ();

0 commit comments

Comments
 (0)