Re: psql: show only failed queries - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: psql: show only failed queries
Date
Msg-id CAFj8pRDkBY_BZVCMg2qW8rP5ey_s07uqTFOR2-3v1zMUZ=3sYQ@mail.gmail.com
Whole thread Raw
In response to Re: psql: show only failed queries  (Rajeev rastogi <rajeev.rastogi@huawei.com>)
Responses Re: psql: show only failed queries
List pgsql-hackers



2014-06-30 8:17 GMT+02:00 Rajeev rastogi <rajeev.rastogi@huawei.com>:

On 26 June 2014 11:53, Samrat Revagade Wrote:

 

>> I am sending updated patch - buggy statement is printed via more logical psql_error function instead printf

 

>Thank you for updating patch, I really appreciate your efforts.

 

>Now, everything is good from my side.

>* it apply cleanly to the current git master

>* includes necessary docs

>* I think It is very good  and necessary feature.

 

>If Kumar Rajeev Rastogi do not have any extra comments, then I think patch is  ready for committer.

 

I have reviewed this patch. Please find my review comments below:

1.     Command start-up option (e.g. -a/--echo-all for --ECHO=all), for new functionality is not provided.

all not options entered via psql variables has psql option and psql comment. I'll plan add new decription to --help-variables list.

If it is necessary I can add long option --echo-errors, I didn't a good char for short option. Any idea?


 

2.     New Command start-up option should be added in "psql --help" as well as in documentation.

depends on previous,

 

 

Also as I understand, this new option is kind of sub-set of existing option (ECHO=query), so should not we display

query string in the same format as it was getting printed earlier.

Though I also feel that prefixing query with STATEMENT word will be helpful to grep but at the same time I am worried

about inconsistency with existing option.   


This is question. And I am not strong in feeling what should be preferred. But still I am inclined to prefer a variant with STATEMENT prefix. Mode with -a is used with different purpose than mode "show errors only" - and output with prefix is much more consistent with log entry - and displaying error. So I agree, so there is potential inconsistency (but nowhere is output defined), but this output is more practical, when you are concentrated to error's processing.

Regards

Pavel
 

 

Thanks and Regards,

Kumar Rajeev Rastogi


pgsql-hackers by date:

Previous
From: Etsuro Fujita
Date:
Subject: Re: inherit support for foreign tables
Next
From: Abhijit Menon-Sen
Date:
Subject: Re: Providing catalog view to pg_hba.conf file - Patch submission