how to capture query?

Started by Markabout 21 years ago3 messagesgeneral
Jump to latest
#1Mark
sendmailtomark@yahoo.com

Hi,
I'm getting some errors in log file saying "invalid character at
position
#20..." I know that this is most likely that query is wrong.

Is it possible to capture all queries that get send or at least the
invalid queries?

I'm using postgresql 7.4.3 on Red Hat 9

Thanks,
Mark

__________________________________
Do you Yahoo!?
The all-new My Yahoo! - What will yours do?
http://my.yahoo.com

#2Brad Nicholson
bnichols@ca.afilias.info
In reply to: Mark (#1)
Re: how to capture query?

To log all queries - in your postgresql.conf file, set the following:
log_statement = true

Mark wrote:

Hi,
I'm getting some errors in log file saying "invalid character at
position
#20..." I know that this is most likely that query is wrong.

Is it possible to capture all queries that get send or at least the
invalid queries?

I'm using postgresql 7.4.3 on Red Hat 9

Thanks,
Mark

__________________________________
Do you Yahoo!?
The all-new My Yahoo! - What will yours do?
http://my.yahoo.com

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

--
Brad Nicholson 416-673-4106 bnichols@ca.afilias.info
Database Administrator, Afilias Canada Corp.

#3Yury Don
yura@vpcit.ru
In reply to: Mark (#1)
Re: how to capture query?

M> Hi,
M> I'm getting some errors in log file saying "invalid character at
M> position
M> #20..." I know that this is most likely that query is wrong.

M> Is it possible to capture all queries that get send or at least the
M> invalid queries?

M> I'm using postgresql 7.4.3 on Red Hat 9

M> Thanks,
M> Mark

In postgresql.conf write
log_min_error_statement = error

--
Best regards,
Yury mailto:yura@vpcit.ru