timestamps

current_timestamp: timestamp of begin of transaction
clock_timestamp:   current timestamp

dump via docker

DB_NAME=prod
docker run --net=host --entrypoint pg_dump postgres:9.6.1 -h 127.0.0.1 -p 34011 -U postgres $DB_NAME --compress 9 | pv > dump.sql

Examples for SKIP LOCKED

max number of parameters

max number of parameters is 65535

export json from table

https://dba.stackexchange.com/questions/90482/export-postgres-table-as-json
sed -i -e 's/\\\\/\\/g'

json array contains element

select id from records WHERE payload->'emails' ? 'pgawehn@googlemail.com'