Re: Can psql show me where my script is broken?

From: "Stuart Cooper" <stuart(dot)cooper(at)gmail(dot)com>
To: jws <jsacksteder(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Can psql show me where my script is broken?
Date: 2007-03-09 00:03:33
Message-ID: 7fc8628a0703081603g4dff4750h4dc02e848bc77d61@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> I have an enormous sql script with an incorrect insert line somewhere.
> I can echo the commands to stdout as they are executed, but apparently
> errors go to stderr. How can I determine where the problem is?

from memory, if you invoke it from the shell with psql [connection
options] -f filename.sql
you'll get the line number of filename.sql that has the error.

Good luck,
Stuart.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Omar Eljumaily 2007-03-09 00:35:59 Re: OT: Canadian Tax Database
Previous Message jws 2007-03-08 23:48:15 Can psql show me where my script is broken?