This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- base table | |
-- drop table users cascade; | |
CREATE TABLE users ( | |
id serial PRIMARY KEY, | |
username text NOT NULL UNIQUE, | |
password text, | |
created_on timestamptz NOT NULL, | |
last_logged_on timestamptz NOT NULL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table my_table (id integer primary key, data text); | |
create function my_func(id integer, data text) | |
returns void | |
language plpgsql | |
as | |
$$ | |
begin | |
insert into my_table values (id, data); | |
end; | |
$$; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This query creates JSON input for AWS DMS (Data Migration Service) selection rules. | |
* It incluedes all schemas. | |
*/ | |
WITH rules AS ( | |
SELECT | |
format('{ | |
"rule-type": "selection", | |
"rule-id": "%s", |