Re: [SQL] Sending errors from psql to error file

2004-08-15 Thread Oliver Elphick
On Thu, 2004-08-12 at 16:09, Oliver Elphick wrote: > "2>" redirects standard error I forgot to say "&1" means the file open on file descriptor 1, which is always standard output. So "2>&1" means send standard error to standard output, so that a pipe (which just takes standard output) can see the

Re: [SQL] Sending errors from psql to error file

2004-08-12 Thread Devin Whalen
On Thu, 2004-08-12 at 11:09, Oliver Elphick wrote: > On Thu, 2004-08-12 at 16:01, Devin Whalen wrote: > > > zcat cli_postDataInserts.sql.gz | > > >psql -d cli_post -U system --echo-queries -f - >trace.file 2>&1 > > > > Just a few questions about your command. I tried it with one sql > > state

Re: [SQL] Sending errors from psql to error file

2004-08-12 Thread Oliver Elphick
On Thu, 2004-08-12 at 16:01, Devin Whalen wrote: > > zcat cli_postDataInserts.sql.gz | > >psql -d cli_post -U system --echo-queries -f - >trace.file 2>&1 > > Just a few questions about your command. I tried it with one sql > statement that I know doesn't work and the error went into the right

Re: [SQL] Sending errors from psql to error file

2004-08-12 Thread Oliver Elphick
On Thu, 2004-08-12 at 15:20, Devin Whalen wrote: > Hello, > > I am trying to migrate a client from one database to another. Basically > we designed a web application for them using Postgresql but we have made > many changes to the design of our application since version 1. Now they > want to upg

Re: [SQL] Sending errors from psql to error file

2004-08-12 Thread Devin Whalen
On Thu, 2004-08-12 at 10:50, Oliver Elphick wrote: > On Thu, 2004-08-12 at 15:20, Devin Whalen wrote: > > Hello, > > > > I am trying to migrate a client from one database to another. Basically > > we designed a web application for them using Postgresql but we have made > > many changes to the des

Re: [SQL] Sending errors from psql to error file

2004-08-12 Thread Richard Huxton
Devin Whalen wrote: I don't want to have to sit there and watch the import go by, I want to run a command and then look in a file for any errors after the import is complete. I tried this command but it didn't work: gunzip -c cli_postDataInserts.sql.gz | psql cli_post -U system | grep "ERROR:*" >

[SQL] Sending errors from psql to error file

2004-08-12 Thread Devin Whalen
Hello, I am trying to migrate a client from one database to another. Basically we designed a web application for them using Postgresql but we have made many changes to the design of our application since version 1. Now they want to upgrade. So basically I have to pg_dump their current data and