mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-17 19:13:16 +08:00
PostgreSQL 12 changed the log level in client tools, such as `pg_dump`, which makes some of our tests fail due to different log level labels. This change filters and modifies the log level output of `pg_dump` in earlier PostgreSQL versions to adopt the new PostgreSQL 12 format.
11 lines
376 B
Bash
Executable File
11 lines
376 B
Bash
Executable File
export PGOPTIONS
|
|
PGOPTIONS='--client-min-messages=warning'
|
|
|
|
# PG12 changed client logging so NOTICE messages are now warning.
|
|
# We adopt this also for older PG versions to make tests compatible.
|
|
${PG_BINDIR}/pg_dump -h ${PGHOST} -U dump_unprivileged dump_unprivileged 2>&1 > /dev/null | sed 's/NOTICE/warning/g'
|
|
|
|
if [ $? -eq 0 ]; then
|
|
echo "Database dumped successfully"
|
|
fi
|