(thanks mr. apollo): https://gist.github.com/apolloclark/ea5466d5929e63043dcf
SELECT
con.conname AS constraint_name,
con.contype AS constraint_type,
pg_get_constraintdef(con.oid) AS constraint_definition
FROM
(thanks mr. apollo): https://gist.github.com/apolloclark/ea5466d5929e63043dcf
SELECT
con.conname AS constraint_name,
con.contype AS constraint_type,
pg_get_constraintdef(con.oid) AS constraint_definition
FROM
| PARAMS_LIST=$(aws ssm get-parameters-by-path \ | |
| --path "/var/path/" \ | |
| --recursive \ | |
| --query 'Parameters[*].[Name, Value]' \ | |
| --output text \ | |
| --with-decryption) | |
| # "/var/path/VARNAME variable_value" --> "export VARNAME=variable_value" | |
| EXPORT_STATEMENTS=$(echo "$PARAMS_LIST" | awk '{ sub(".*/", "", $1); printf("export %s=\"%s\"\n", $1, $2) }') |