Re: Proposed GUC Variable - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject Re: Proposed GUC Variable
Date
Msg-id GNELIHDDFBOCMGBFGEFOMENMCDAA.chriskl@familyhealth.com.au
Whole thread Raw
In response to Re: Proposed GUC Variable  (Gavin Sherry <swm@linuxworld.com.au>)
List pgsql-hackers
> Quick hack while eating a sandwich.
>
> template1=# select * frum;
> ERROR:  parser: parse error at or near "frum" at character 10
> ERROR QUERY: select * frum;
>
> Now, I did say quick hack. 'ERROR QUERY' isn't a new error level I just
> strcat() it to buf_msg in elog() if debug_print_error_query is
> true. Question: from Chris's request it doesn't sound like there is much
> use writing this to the client. Does everyone else feel the same way?
>
> If so, I'll patch it up and send off.

How about the ERROR occurs and is sent to client and logged.  Then you do
another elog(LOG,  querystring) sort of thing.  That way you won't confuse
clients that are parsing the messages but those interested in the log text
can read it quite happily.

That'd be my preferred solution...

Thanks for working on this BTW gavin.

Chris



pgsql-hackers by date:

Previous
From: "Christopher Kings-Lynne"
Date:
Subject: Excellent DBMS Resource Site
Next
From: Markus Bertheau
Date:
Subject: Re: Proposed GUC Variable