Re: [BUGS] pg_dumpall

From: "Kardos, Dr(dot) Andreas" <kardos(at)repas-aeg(dot)de>
To: "Peter Eisentraut" <peter_e(at)gmx(dot)net>
Cc: <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: [BUGS] pg_dumpall
Date: 2000-03-06 17:06:10
Message-ID: 009501bf878e$45f3bad0$99301eac@Dr.repas.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

1. The version of pg_dumpall you have mailed works fine under QNX4.

I see only one minor matter which could be improved:

Since PATHNAME contains already a slash at the end a construct like

${PATHNAME}/psql

expands to

/usr/local/pgsql/bin//psql

but the unnecessary slash doesn't disturb of course.

2. FOO="`echo "$BAR"`"

This construct I have found working on QNX4, Digital Unix, SunOS and Linux.
But the problem seems not to be so simple. After removing the backslashes
from the old pg_dumpall it didn't work any more on Digital Unix! So the
escaped double quotes make sense somewhere in some context.

The new pg_dumpall should be tested on some more platforms. QNX4 is rather
an exotic one. Unfortunately I have an 7.0 installation only on QNX4 here.

Andreas Kardos

-----Ursprüngliche Nachricht-----
Von: Peter Eisentraut <peter_e(at)gmx(dot)net>
An: Kardos, Dr. Andreas <kardos(at)repas-aeg(dot)de>
Cc: <pgsql-bugs(at)postgreSQL(dot)org>
Gesendet: Sonntag, 5. März 2000 00:00
Betreff: Re: [BUGS] pg_dumpall

Kardos, Dr. Andreas writes:

> The pg_dumpall script is not compatible with 7.0 psql and createdb.

I've fixed up the logic and it seems to work but I attach it here so you
can try it because I don't have a reasonably-sized database around right
now.

Regarding the quoting, I'm inclined to say that
FOO="`echo "$BAR"`"
style constructs are okay but I'd like to hear from anyone that thinks (or
knows) otherwise. At first I thought
echo "$BAR" | read FOO
might do the trick but for some reason I couldn't get it to work.

I'd be interested in a definite solution to this because it seems some
other shell scripts in the tree suffer from similar problems.

> 1. pgsql -l delivers a different output (Owner instead of User ID).

> 2. createdb -help in the following line tries to connect the host "elp".

> 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.

--
Peter Eisentraut Sernanders väg 10:115
peter_e(at)gmx(dot)net 75262 Uppsala
http://yi.org/peter-e/ Sweden

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2000-03-07 06:51:32 Re: [BUGS] grant/revoke bug with delete/update
Previous Message Jerome ALET 2000-03-06 09:12:52 Re: [BUGS] grant/revoke bug with delete/update