Thread: Any troubleshooting techniques

Any troubleshooting techniques

From
"Johnson, Shaunn"
Date:

Howdy:

I'm running Postgres 7.1.3 on RedHat Linux
version 7.2, kernel 2.4.7-10.

I've created a script to build a table
and will run it through a command line
option ( psql -U user -d database -f ./test.sql).
At the top of the script, I put explain,
so I can at least try to figure out what
the script is doing. 

But the only errors I get is:

[snip error]

psql:./test.sql:68: ERROR:  parser: parse error
at or near "create"

[/snip error]

In the script, line 68 is the bottom of
the page (a semi colon) which tells me
that somewhere between the top and
bottom of the script, there is an error.

Is there an easier way to debug SQL?

Thanks!

-X

Re: Any troubleshooting techniques

From
Doug McNaught
Date:
"Johnson, Shaunn" <SJohnson6@bcbsm.com> writes:

> But the only errors I get is:
>
> [snip error]
>
> psql:./test.sql:68: ERROR:  parser: parse error
> at or near "create"
>
> [/snip error]
>
> In the script, line 68 is the bottom of
> the page (a semi colon) which tells me
> that somewhere between the top and
> bottom of the script, there is an error.

Errors at EOF often mean there is a missing close-quote or
close-paren.  Check your balancing.

-Doug
--
Let us cross over the river, and rest under the shade of the trees.
   --T. J. Jackson, 1863