Skip to content

Commit

Permalink
add tests for correct schemas and fix naming
Browse files Browse the repository at this point in the history
  • Loading branch information
danicc097 committed Dec 1, 2022
1 parent 5a0a2bf commit 3895ee7
Show file tree
Hide file tree
Showing 10 changed files with 453 additions and 3 deletions.
21 changes: 21 additions & 0 deletions sample/definitions/function/static_error_disabled.pgsql
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
DROP TABLE IF EXISTS users_2 CASCADE;

CREATE TABLE users_2 (
id integer not null PRIMARY KEY
);

create or replace function update_updated_at_column ()
returns trigger
language plpgsql
as $function$
begin
new.updated_at = NOW();
return new;
end;
$function$;

-- TODO some kind of flag for disabling static analysis only per statement
-- plpgsql-language-server:disable-static
create trigger update_users_2_modtime -- should raise error
before update on users_2 for each row
execute function update_updated_at_column ();
Loading

0 comments on commit 3895ee7

Please sign in to comment.