mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
554ec1c0f0
This test should ensure wal2json functions. I'm planning to upgrade wal2json, so it seems nice to have a test here. It passes on my machine.
75 lines
1.8 KiB
Plaintext
75 lines
1.8 KiB
Plaintext
init
|
|
{
|
|
"change": [
|
|
{
|
|
"kind": "message",
|
|
"transactional": false,
|
|
"prefix": "wal2json",
|
|
"content": "this non-transactional message will be delivered even if you rollback the transaction"
|
|
}
|
|
]
|
|
}
|
|
{
|
|
"change": [
|
|
{
|
|
"kind": "insert",
|
|
"schema": "public",
|
|
"table": "table2_with_pk",
|
|
"columnnames": ["a", "b", "c"],
|
|
"columntypes": ["integer", "character varying(30)", "timestamp without time zone"],
|
|
"columnvalues": [1, "Backup and Restore", "2018-03-27 12:05:29.914496"]
|
|
}
|
|
,{
|
|
"kind": "insert",
|
|
"schema": "public",
|
|
"table": "table2_with_pk",
|
|
"columnnames": ["a", "b", "c"],
|
|
"columntypes": ["integer", "character varying(30)", "timestamp without time zone"],
|
|
"columnvalues": [2, "Tuning", "2018-03-27 12:05:29.914496"]
|
|
}
|
|
,{
|
|
"kind": "insert",
|
|
"schema": "public",
|
|
"table": "table2_with_pk",
|
|
"columnnames": ["a", "b", "c"],
|
|
"columntypes": ["integer", "character varying(30)", "timestamp without time zone"],
|
|
"columnvalues": [3, "Replication", "2018-03-27 12:05:29.914496"]
|
|
}
|
|
,{
|
|
"kind": "message",
|
|
"transactional": true,
|
|
"prefix": "wal2json",
|
|
"content": "this message will be delivered"
|
|
}
|
|
,{
|
|
"kind": "delete",
|
|
"schema": "public",
|
|
"table": "table2_with_pk",
|
|
"oldkeys": {
|
|
"keynames": ["a", "c"],
|
|
"keytypes": ["integer", "timestamp without time zone"],
|
|
"keyvalues": [1, "2018-03-27 12:05:29.914496"]
|
|
}
|
|
}
|
|
,{
|
|
"kind": "delete",
|
|
"schema": "public",
|
|
"table": "table2_with_pk",
|
|
"oldkeys": {
|
|
"keynames": ["a", "c"],
|
|
"keytypes": ["integer", "timestamp without time zone"],
|
|
"keyvalues": [2, "2018-03-27 12:05:29.914496"]
|
|
}
|
|
}
|
|
,{
|
|
"kind": "insert",
|
|
"schema": "public",
|
|
"table": "table2_without_pk",
|
|
"columnnames": ["a", "b", "c"],
|
|
"columntypes": ["integer", "numeric(5,2)", "text"],
|
|
"columnvalues": [1, 2.34, "Tapir"]
|
|
}
|
|
]
|
|
}
|
|
stop
|