pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedFinding context for error log
3+ messages / 3 participants
[nested] [flat]
* Finding context for error log
@ 2006-09-26 14:19 Kyle Bateman <kyle@actarg.com>
0 siblings, 1 reply; 3+ messages in thread
From: Kyle Bateman @ 2006-09-26 14:19 UTC (permalink / raw)
To: pgsql-sql
I get the following message in my postgres log:
ERROR: 42601: syntax error at or near "%" at character 269
LOCATION: yyerror, scan.l:761
I have a fairly complex schema (lots of database objects) and many users
hitting the db with lots of connections, so I'm not really sure what bit
of code is causing the problem. Is there an easy way to get postgres to
spit out the SQL statement it was parsing when it generated the error?
I've experimented with log_error_verbosity and log_min_messages but
still haven't seen any SQL in the log.
Kyle
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Finding context for error log
@ 2006-09-26 14:56 Tom Lane <tgl@sss.pgh.pa.us>
parent: Kyle Bateman <kyle@actarg.com>
0 siblings, 1 reply; 3+ messages in thread
From: Tom Lane @ 2006-09-26 14:56 UTC (permalink / raw)
To: Kyle Bateman <kyle@actarg.com>; +Cc: pgsql-sql
Kyle Bateman <kyle@actarg.com> writes:
> Is there an easy way to get postgres to
> spit out the SQL statement it was parsing when it generated the error?
"log_min_error_statement = error" is what you're looking for.
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Finding context for error log
@ 2006-09-26 19:37 Vivek Khera <vivek@khera.org>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 3+ messages in thread
From: Vivek Khera @ 2006-09-26 19:37 UTC (permalink / raw)
To: pgsql-sql
On Sep 26, 2006, at 10:56 AM, Tom Lane wrote:
> "log_min_error_statement = error" is what you're looking for.
my personal belief is that this should be the default, as the current
default (essentially "never") is mostly useless.
Attachments:
smime.p7s (application/pkcs7-signature, 2.5K) download
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2006-09-26 19:37 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-09-26 14:19 Finding context for error log Kyle Bateman <kyle@actarg.com>
2006-09-26 14:56 ` Tom Lane <tgl@sss.pgh.pa.us>
2006-09-26 19:37 ` Vivek Khera <vivek@khera.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox