[BUGS] I incrementally altered my database into a state where backups couldn't be restored.

2007-10-31 Thread Adam Tomjack
I was able to put my database into a state where I couldn't restore a backup without manually editing the backup file. I make backups like so: $pg_dump --disable-triggers -S postgres -U postgres dbname > dbname.sql I did an ALTER TABLE which added a column to a table. That table was used in a

Re: [BUGS] I incrementally altered my database into a state where backups couldn't be restored.

2007-10-31 Thread Heikki Linnakangas
Adam Tomjack wrote: I was able to put my database into a state where I couldn't restore a backup without manually editing the backup file. I can't reproduce that on 8.1 or 8.2 or CVS HEAD. pg_dump produces this CREATE statement for the view: CREATE VIEW v_a_b_c AS SELECT b.aid, b.bid, c.

Re: [BUGS] I incrementally altered my database into a state where backups couldn't be restored.

2007-10-31 Thread Gregory Stark
"Adam Tomjack" <[EMAIL PROTECTED]> writes: > -- This will succeed: > SELECT * FROM v_a_b_c; > > -- But, this will fail with > -- ERROR: common column name "aid" appears more than once in left table > -- SQL state: 42702 > SELECT * > FROM b > JOIN c USING (bid) > JOIN a USING (aid) > > -- It is n

Re: [BUGS] I incrementally altered my database into a state where backups couldn't be restored.

2007-10-31 Thread Gregory Stark
"Tom Lane" <[EMAIL PROTECTED]> writes: > Gregory Stark <[EMAIL PROTECTED]> writes: >> That does really suck. But I'm not sure what we can do about it. There's no >> SQL which is entirely equivalent to the resulting view. > > If we were to do anything about it, I think it would have to be to > forb

Re: [BUGS] I incrementally altered my database into a state where backups couldn't be restored.

2007-10-31 Thread Tom Lane
Gregory Stark <[EMAIL PROTECTED]> writes: > That does really suck. But I'm not sure what we can do about it. There's no > SQL which is entirely equivalent to the resulting view. If we were to do anything about it, I think it would have to be to forbid the original ALTER. But I don't see any good

Re: [BUGS] I incrementally altered my database into a state where backups couldn't be restored.

2007-10-31 Thread Heikki Linnakangas
Heikki Linnakangas wrote: Adam Tomjack wrote: I was able to put my database into a state where I couldn't restore a backup without manually editing the backup file. I can't reproduce that on 8.1 or 8.2 or CVS HEAD. pg_dump produces this CREATE statement for the view: CREATE VIEW v_a_b_c AS

Re: [BUGS] I incrementally altered my database into a state where backups couldn't be restored.

2007-10-31 Thread Adam Tomjack
> Which version of Postgres are you using? PostgreSQL 8.1.5 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.4.2 (mingw-special) > I can't reproduce that on 8.1 or 8.2 or CVS HEAD. > [...] > Not the CREATE OR REPLACE with a SELECT * you posted. I was lazy, I apologize. I typed the CREATE OR

[BUGS] BUG #3711: dropdb and creatdb with pgpass.conf file

2007-10-31 Thread gregory vallet
The following bug has been logged online: Bug reference: 3711 Logged by: gregory vallet Email address: [EMAIL PROTECTED] PostgreSQL version: 8.2 Operating system: Windows XP Description:dropdb and creatdb with pgpass.conf file Details: In order to automatized the pa

Re: [BUGS] BUG #3711: dropdb and creatdb with pgpass.conf file

2007-10-31 Thread Tom Lane
"gregory vallet" <[EMAIL PROTECTED]> writes: > Why do dropdb and creatdb can't recognize my database name? dropdb and createdb always connect to the "postgres" database, which you did not put an entry for into your pgpass file. As a rule I'd suggest wildcarding the database column in pgpass; it's

Re: [BUGS] BUG #3711: dropdb and creatdb with pgpass.conf file

2007-10-31 Thread Heikki Linnakangas
gregory vallet wrote: In order to automatized the password on commands like pg_dump, dropdb and creatdb, I created a pgpass.conf file with "localhost:5432:02HH65:superuser:xxx" With the pg_dump command, it's OK with dropdb and creatdb, system asks me for the password. If I replace "02HH65"