Re: [GENERAL] problem with recreating database with export

2012-09-29 Thread Jasen Betts
On 2012-09-27, Dennis Gearon wrote: > The errors were always 'illegal command', 10s of thousands of them. As far as > what I did 2 years ago, I can't remember 2 days ago, sorry about that ;-) Yes > it > is a plan text dump. I don't have huge databases yet, so to make it easier to > go > betw

Re: [GENERAL] problem with recreating database with export

2012-09-27 Thread Leif Biberg Kristensen
Torsdag 27. september 2012 16.55.15 skrev Dennis Gearon : > > To anyone reading this in the future, if you have problems importing a > plain text database export, it is usually impossible to do: > psql -d some_dbase -f the_backup.sql. I don't know why. What works is doing > 'cd ./the_files_direct

Re: [GENERAL] problem with recreating database with export

2012-09-27 Thread Adrian Klaver
On 09/27/2012 07:55 AM, Dennis Gearon wrote: To anyone reading this in the future, if you have problems importing a plain text database export, it is usually impossible to do: psql -d some_dbase -f the_backup.sql. I don't know why. What works is doing 'cd ./the_files_directory', going INTO psql

Re: [GENERAL] problem with recreating database with export

2012-09-27 Thread Dennis Gearon
The only thing that I can offer is that it works from inside psql as user postgre but NOT from invoking postgres using -f filename from the commas line as user postgre. I have to admit that I did not use -U as OS user postgres, but that shouldn't be necessary with a stock gnarled_conf file. Th

Re: [GENERAL] problem with recreating database with export

2012-09-27 Thread Raymond O'Donnell
On 27/09/2012 15:55, Dennis Gearon wrote: > > To anyone reading this in the future, if you have problems importing a > plain text database export, it is usually impossible to do: > psql -d some_dbase -f the_backup.sql. I don't know why. What works is I think that's a bit of an over-generalisation

Re: [GENERAL] problem with recreating database with export

2012-09-27 Thread Dennis Gearon
Never, ever approach a computer saying or even thinking "I will just do this quickly." From: Alban Hertroys To: Dennis Gearon Cc: Adrian Klaver ; pgsql-general@postgresql.org Sent: Thu, September 27, 2012 8:13:17 AM Subject: Re: [GENERAL] problem

Re: [GENERAL] problem with recreating database with export

2012-09-27 Thread Alban Hertroys
On 27 September 2012 16:55, Dennis Gearon wrote: > > To anyone reading this in the future, if you have problems importing a plain > text database export, it is usually impossible to do: > psql -d some_dbase -f the_backup.sql. I don't know why. Looks like you forgot -U postgres -- If you can't

Re: [GENERAL] problem with recreating database with export

2012-09-27 Thread Dennis Gearon
___ From: Adrian Klaver To: Dennis Gearon Cc: pgsql-general@postgresql.org Sent: Thu, September 27, 2012 6:34:31 AM Subject: Re: [GENERAL] problem with recreating database with export On 09/26/2012 08:44 PM, Dennis Gearon wrote: > It turns out that I had made the export from psql, a text

Re: [GENERAL] problem with recreating database with export

2012-09-27 Thread Adrian Klaver
On 09/26/2012 08:44 PM, Dennis Gearon wrote: It turns out that I had made the export from psql, a text based export. I just do not see how you can be exporting schema definitions from within psql. I still say pg_dump is involved somewhere. So I read that it was actually needing to be impo

Re: [GENERAL] problem with recreating database with export

2012-09-26 Thread Dennis Gearon
It turns out that I had made the export from psql, a text based export. So I read that it was actually needing to be imported using '\i filename_in_local_directory' Dennis Gearon Never, ever approach a computer saying or even thinking "I will just do this quickly."

Re: [GENERAL] problem with recreating database with export

2012-09-26 Thread Adrian Klaver
On 09/26/2012 07:41 PM, Dennis Gearon wrote: I have a database export done via copy. It's all the tables, contraints, blah blah. More information may be in order. What versions of Postgres are you using? Are you going from one version to another? Did you really use COPY for everything(schema i