Re: [BUGS] pg_dumpall

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: "Kardos, Dr(dot) Andreas" <kardos(at)repas-aeg(dot)de>
Cc: pgsql-bugs(at)postgreSQL(dot)org
Subject: Re: [BUGS] pg_dumpall
Date: 2000-03-07 23:09:45
Message-ID: 200003072309.SAA27170@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

[Charset iso-8859-1 unsupported, filtering to ASCII...]
> The pg_dumpall script is not compatible with 7.0 psql and createdb.
>
> 1. pgsql -l delivers a different output (Owner instead of User ID).
> Therefore in the following command "usesysid" has to be replaced by
> "usename":
>
> POSTGRES_USER="`echo \" \
> select usename \
> from pg_shadow \
> where usesysid = $DBUSERID; \" | \
> psql -A -q -t template1`"

Fixed.

>
> 2. createdb -help in the following line tries to connect the host "elp".
>
> if createdb -help|grep encoding >/dev/null
> then
> echo "create database $DATABASE with encoding='`pg_encoding $ENCODING`';"
> else
> echo "create database $DATABASE;"
> fi

Thanks. I changed it to run pg_encoding and see if it existed.

Patch applied.

>
> Unfortunately it is not sufficient to use
>
> createdb --help|grep encoding
>
> because the word "encoding" is always present in the usage message now.
>
> 3. QNX4 only: The double quotes in
>
> POSTGRES_USER="`echo \" \
>
> etc. must not be escaped with a backslash. Unfortunately I haven't found a
> simple solution working on all platforms. Thats why I am not sending a
> patch.

Wow, that is pretty broken if it can't handle that.

--
Bruce Momjian | http://www.op.net/~candle
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

  • pg_dumpall at 2000-03-03 15:06:45 from Kardos, Dr. Andreas

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2000-03-07 23:22:04 Re: [HACKERS] Re: [BUGS] uniqueness not always correct
Previous Message Bruce Momjian 2000-03-07 22:50:57 Re: [HACKERS] Re: [BUGS] uniqueness not always correct