Re: [GENERAL] Vacuous errors in pg_dump ... | pg_restore pipeline

2008-02-21 Thread Vivek Khera
On Feb 20, 2008, at 2:12 PM, Douglas McNaught wrote: Alternatively, is there a better way to streamline the duplication of a database? How about: CREATE DATABASE newdb TEMPLATE olddb; The template DB has to have no open connections during the entire copy process, so it is not always

Re: [GENERAL] Vacuous errors in pg_dump ... | pg_restore pipeline

2008-02-20 Thread SunWuKung
On Feb 20, 8:12 pm, [EMAIL PROTECTED] ("Douglas McNaught") wrote: > On 2/20/08, Kynn Jones <[EMAIL PROTECTED]> wrote: > > > Alternatively, is there a better way to streamline the duplication of a > > database? > > How about: > > CREATE DATABASE newdb TEMPLATE olddb; > Do these methods also recreat

Re: [GENERAL] Vacuous errors in pg_dump ... | pg_restore pipeline

2008-02-20 Thread Tom Lane
"Kynn Jones" <[EMAIL PROTECTED]> writes: > As far as the shell is concerned, this pipeline fails, due to three errors > emitted by pg_restore. All these errors are vacuous, as far as I can tell. They're hardly vacuous --- they're telling you that the destination database will be missing plpgsql,

Re: [GENERAL] Vacuous errors in pg_dump ... | pg_restore pipeline

2008-02-20 Thread Douglas McNaught
On 2/20/08, Kynn Jones <[EMAIL PROTECTED]> wrote: > Alternatively, is there a better way to streamline the duplication of a > database? How about: CREATE DATABASE newdb TEMPLATE olddb; (don't remember the exact syntax, but it'll be in the docs for CREATE DATABASE). I think the 'createdb' progr

[GENERAL] Vacuous errors in pg_dump ... | pg_restore pipeline

2008-02-20 Thread Kynn Jones
Hi. I've written a Unix shell (zsh) script to streamline the process of duplicating a database. At the heart of this script I have the following pipeline: pg_dump -U $OWNER -Fc $FROM | pg_restore -U $OWNER -d $TO As far as the shell is concerned, this pipeline fails, due to three errors emitt