Re: [ADMIN] Restoring pg_dump Backup with psql Fails

2007-12-30 Thread Phillip Smith
> Yeah, but what other user-created stuff (functions for instance) might > be in there? > You might want to drop template1 and recreate it from template0. > (There's a blow-by-blow article about doing that on techdocs, IIRC.) I think I'll do that :) Thanks Tom & Joshua - you've been most helpful a

Re: [ADMIN] Restoring pg_dump Backup with psql Fails

2007-12-30 Thread Tom Lane
"Phillip Smith" <[EMAIL PROTECTED]> writes: > I think I've found my problem: > I don't know how or when those tables were created in template1 - they're > certainly not supposed to be there or needed. Is it safe to just DROP the > tables from template1? Yeah, but what other user-created stuff (fun

Re: [ADMIN] Restoring pg_dump Backup with psql Fails

2007-12-30 Thread Phillip Smith
> You have several problems in this dump. One it appears that some of the > releations already exist. Did you by chance accidently create stuff > within template1 at some point? I think I've found my problem: [EMAIL PROTECTED] backups]$ psql template1 Welcome to psql 8.2.4, the PostgreSQL interact

Re: [ADMIN] Restoring pg_dump Backup with psql Fails

2007-12-28 Thread Tom Lane
"Phillip Smith" <[EMAIL PROTECTED]> writes: > I've attached the first 512 lines of the output from psql. The whole output > is 3mb. Hmm, these are a bit troubling: > ERROR: relation "grps" already exists > ... > ERROR: relation "stock" already exists because you claimed you were restoring into

Re: [ADMIN] Restoring pg_dump Backup with psql Fails

2007-12-28 Thread Joshua D. Drake
ADMIN] Restoring pg_dump Backup with psql Fails "Phillip Smith" <[EMAIL PROTECTED]> writes: But I get a whole bunch of errors, for example: ERROR: syntax error at or near "all" LINE 1: all orders over $400.00 - freight free Order 10 of any produ... ^ Please

Re: [ADMIN] Restoring pg_dump Backup with psql Fails

2007-12-28 Thread Phillip Smith
> Cc: pgsql-admin@postgresql.org > Subject: Re: [ADMIN] Restoring pg_dump Backup with psql Fails > > "Phillip Smith" <[EMAIL PROTECTED]> writes: > > But I get a whole bunch of errors, for example: > > > > ERROR: syntax error at or near "all"

Re: [ADMIN] Restoring pg_dump Backup with psql Fails

2007-12-28 Thread Tom Lane
"Phillip Smith" <[EMAIL PROTECTED]> writes: > But I get a whole bunch of errors, for example: > > ERROR: syntax error at or near "all" > LINE 1: all orders over $400.00 - freight free Order 10 of any produ... > ^ Please show us the *first* few errors, not some randomly chosen ones. The a

[ADMIN] Restoring pg_dump Backup with psql Fails

2007-12-28 Thread Phillip Smith
PostgreSQL 8.2.4 on RedHat ES4 64-bit Hi all, Doing some works on a database this morning (changing it to take data from our new ERP system) so naturally I made a backup of the database first: pg_dump important_database > ~/backup/important-071229.sql chmod 440 ~/backup/important-07