Re: Can psql show me where my script is broken? - Mailing list pgsql-general

From Stuart Cooper
Subject Re: Can psql show me where my script is broken?
Date
Msg-id 7fc8628a0703081603g4dff4750h4dc02e848bc77d61@mail.gmail.com
Whole thread Raw
In response to Can psql show me where my script is broken?  ("jws" <jsacksteder@gmail.com>)
Responses Re: Can psql show me where my script is broken?  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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.

pgsql-general by date:

Previous
From: "jws"
Date:
Subject: Can psql show me where my script is broken?
Next
From: Jean-Michel Pouré
Date:
Subject: Tsearch2 / Create rule on select