Project

General

Profile

« Previous | Next » 

Revision 3388

pg_dump_vegbien: Added plain env var which creates plain text output instead, for use in debugging and validation

View differences:

bin/pg_dump_vegbien
4 4
selfDir="$(dirname -- "$0")"
5 5

  
6 6
if ! test "$#" -eq 1; then
7
    echo "Usage: env [data=1] [owners=1] $0 schema >schema.sql"
7
    echo "Usage: env [data=1] [plain=1] [owners=1] $0 schema >schema.sql"
8 8
    exit 2
9 9
fi
10
test -n "$data" && dataOpts='--format=c --compress=9' || dataOpts=--schema-only
11
test -n "$owners" && noOwners= || noOwners=1
10
if test -n "$data"; then
11
    if test -n "$plain"; then dataOpts=--format=p
12
    else dataOpts='--format=c --compress=9'
13
    fi
14
else dataOpts=--schema-only
15
fi
16
test -n "$owners" && ownerOpts= || ownerOpts='--no-owner --no-privileges'
12 17

  
13 18
(set -x; "$selfDir/../bin/postgres_vegbien" pg_dump --schema="\"$1\"" \
14
$dataOpts${noOwners:+ --no-owner --no-privileges})
19
$dataOpts $ownerOpts)

Also available in: Unified diff