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

2010-02-10 Thread Tom Lane
Takahiro Itagaki itagaki.takah...@oss.ntt.co.jp 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

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 t...@sss.pgh.pa.us wrote: Takahiro Itagaki itagaki.takah...@oss.ntt.co.jp 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?

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

2010-02-10 Thread Kevin Grittner
Robert Haas robertmh...@gmail.com wrote: Tom Lane t...@sss.pgh.pa.us 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

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

2010-02-10 Thread Alvaro Herrera
Kevin Grittner escribió: Robert Haas robertmh...@gmail.com wrote: Tom Lane t...@sss.pgh.pa.us 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

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

2010-02-10 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.com writes: Kevin Grittner escribió: Robert Haas robertmh...@gmail.com wrote: Tom Lane t...@sss.pgh.pa.us 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

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

2010-02-10 Thread Alvaro Herrera
Tom Lane escribió: Alvaro Herrera alvhe...@commandprompt.com writes: Kevin Grittner escribi�: Robert Haas robertmh...@gmail.com wrote: Tom Lane t...@sss.pgh.pa.us wrote: We try to avoid using nonstandard SQL in dumps. How often do we succeed? It seems unlikely that our dumps would

[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 OBJECT. The cleanup command fails if the target object doesn't exist. Is it a TODO item to replace DROP into DROP