Re: [HACKERS] pg_restore --single-transaction and --clean

2010-02-10 Thread Alvaro Herrera
Tom Lane escribió: > Alvaro Herrera writes: > > Kevin Grittner escribi�: > >> Robert Haas wrote: > > Tom Lane wrote: > We try to avoid using nonstandard SQL in dumps. > > >>> How often do we succeed? It seems unlikely that our dumps would > >>> be restorable into any other database. > >

Re: [HACKERS] pg_restore --single-transaction and --clean

2010-02-10 Thread Tom Lane
Alvaro Herrera writes: > Kevin Grittner escribió: >> Robert Haas wrote: > Tom Lane wrote: We try to avoid using nonstandard SQL in dumps. >>> How often do we succeed? It seems unlikely that our dumps would >>> be restorable into any other database. >> When we were running in a mixed envi

Re: [HACKERS] pg_restore --single-transaction and --clean

2010-02-10 Thread Alvaro Herrera
Kevin Grittner escribió: > Robert Haas wrote: > > Tom Lane wrote: > > >> We try to avoid using nonstandard SQL in dumps. > > > > How often do we succeed? It seems unlikely that our dumps would > > be restorable into any other database. > > When we were running in a mixed environment we had

Re: [HACKERS] pg_restore --single-transaction and --clean

2010-02-10 Thread Kevin Grittner
Robert Haas wrote: > Tom Lane wrote: >> We try to avoid using nonstandard SQL in dumps. > > How often do we succeed? It seems unlikely that our dumps would > be restorable into any other database. When we were running in a mixed environment we had several occasions where it was useful to fe

Re: [HACKERS] pg_restore --single-transaction and --clean

2010-02-10 Thread Robert Haas
On Wed, Feb 10, 2010 at 10:16 AM, Tom Lane wrote: > Takahiro Itagaki writes: >> Is it a TODO item to replace "DROP" into "DROP IF EXISTS" >> for cleanup commands in pg_restore? > > No.  We try to avoid using nonstandard SQL in dumps. How often do we succeed? It seems unlikely that our dumps wou

Re: [HACKERS] pg_restore --single-transaction and --clean

2010-02-10 Thread Tom Lane
Takahiro Itagaki writes: > Is it a TODO item to replace "DROP" into "DROP IF EXISTS" > for cleanup commands in pg_restore? No. We try to avoid using nonstandard SQL in dumps. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To mak

[HACKERS] pg_restore --single-transaction and --clean

2010-02-09 Thread Takahiro Itagaki
As another glitch in pg_restore, a combination of options --single-transaction and --clean raises errors if we restore data into an empty database. The reason is pg_restore uses DROP . The cleanup command fails if the target object doesn't exist. Is it a TODO item to replace "DROP" into "DROP IF E