Re: [GENERAL] import sql dump with psql - language creation throws error

2009-01-21 Thread Jasen Betts
On 2009-01-20, Andreas Wenk wrote: > > Hi everybody, > > I have an automated mechanism to restore a demo database each night with an > SQL dump. What > I do inbetween a shell script is the following: > > 1. all database access is canceled > 2. dropdb > 3. createdb > 4. import SQL dump: psql -o /d

Re: [GENERAL] import sql dump with psql - language creation throws error

2009-01-20 Thread Adrian Klaver
On Tuesday 20 January 2009 7:50:58 am Andreas Wenk wrote: > > > > > Just to point you to Grzegorz's suggestion of using the -c switch in the > > pg_dump command. To quote the manual: > > > > -c > > "Output commands to clean (drop) database objects prior to (the commands > > for) creating them. > >

Re: [GENERAL] import sql dump with psql - language creation throws error

2009-01-20 Thread Andreas Wenk
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Adrian Klaver schrieb: > On Tuesday 20 January 2009 7:05:23 am Andreas Wenk wrote: > >> Adrian, >> >> no lack of coffee but my fault. You are totally right - that was a copy and >> paste error. For sure the dump is *.sql. >> >> Until now there is no o

Re: [GENERAL] import sql dump with psql - language creation throws error

2009-01-20 Thread Adrian Klaver
On Tuesday 20 January 2009 7:05:23 am Andreas Wenk wrote: > Adrian, > > no lack of coffee but my fault. You are totally right - that was a copy and > paste error. For sure the dump is *.sql. > > Until now there is no onboard solution for this issue. Means, the import of > the dump is working corre

Re: [GENERAL] import sql dump with psql - language creation throws error

2009-01-20 Thread Andreas Wenk
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Adrian Klaver schrieb: > On Tuesday 20 January 2009 2:15:08 am Andreas Wenk wrote: >> Hi everybody, >> >> I have an automated mechanism to restore a demo database each night with an >> SQL dump. What I do inbetween a shell script is the following: >> >

Re: [GENERAL] import sql dump with psql - language creation throws error

2009-01-20 Thread Adrian Klaver
On Tuesday 20 January 2009 2:15:08 am Andreas Wenk wrote: > Hi everybody, > > I have an automated mechanism to restore a demo database each night with an > SQL dump. What I do inbetween a shell script is the following: > > 1. all database access is canceled > 2. dropdb > 3. createdb > 4. import SQL

Re: [GENERAL] import sql dump with psql - language creation throws error

2009-01-20 Thread Andreas Wenk
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi depesz, thanks a lot for the reply. I think that will not work, because this is (still) a 8.1 and tsearch2 is integreated. That means I have to use template1 otherwise tsearch2 would not be there ... Am I right? P.S.: upgrade to 8.3 is planned

Re: [GENERAL] import sql dump with psql - language creation throws error

2009-01-20 Thread Grzegorz Jaƛkiewicz
try creating whole db from scratch, do the dump with option -c (will recreate all objects automagically). you can also issue 'drop language plpgsql [cascade]' before. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.

Re: [GENERAL] import sql dump with psql - language creation throws error

2009-01-20 Thread hubert depesz lubaczewski
On Tue, Jan 20, 2009 at 11:15:08AM +0100, Andreas Wenk wrote: > Where can I prevent bulding the language again? My idea was to do that while > creating the > dump or while importing the dump. But as far as I understand, that's not > possible. instead of "createdb" use: createdb -D template0 Bes

[GENERAL] import sql dump with psql - language creation throws error

2009-01-20 Thread Andreas Wenk
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi everybody, I have an automated mechanism to restore a demo database each night with an SQL dump. What I do inbetween a shell script is the following: 1. all database access is canceled 2. dropdb 3. createdb 4. import SQL dump: psql -o /dev/null $