Re: [HACKERS] psql - better support pipe line

2015-08-27 Thread Pavel Stehule
2015-08-27 11:54 GMT+02:00 Shulgin, Oleksandr oleksandr.shul...@zalando.de : On Wed, Aug 26, 2015 at 5:44 PM, Pavel Stehule pavel.steh...@gmail.com wrote: Hi 2015-08-25 17:21 GMT+02:00 Tom Lane t...@sss.pgh.pa.us: Jim Nasby jim.na...@bluetreble.com writes: What I've had problems with

Re: [HACKERS] psql - better support pipe line

2015-08-27 Thread Pavel Stehule
2015-08-27 11:54 GMT+02:00 Shulgin, Oleksandr oleksandr.shul...@zalando.de : On Wed, Aug 26, 2015 at 5:44 PM, Pavel Stehule pavel.steh...@gmail.com wrote: Hi 2015-08-25 17:21 GMT+02:00 Tom Lane t...@sss.pgh.pa.us: Jim Nasby jim.na...@bluetreble.com writes: What I've had problems with

Re: [HACKERS] psql - better support pipe line

2015-08-27 Thread Jim Nasby
On 8/27/15 8:37 AM, Pavel Stehule wrote: I don't think we can detect and remove the default values from this output in a reliable way? This is pretty difficult - any parameter can be important, and hard to identify default values on client side without connect to server side. I don't

Re: [HACKERS] psql - better support pipe line

2015-08-27 Thread Shulgin, Oleksandr
On Wed, Aug 26, 2015 at 5:44 PM, Pavel Stehule pavel.steh...@gmail.com wrote: Hi 2015-08-25 17:21 GMT+02:00 Tom Lane t...@sss.pgh.pa.us: Jim Nasby jim.na...@bluetreble.com writes: What I've had problems with is trying to correlate psql specified connection attributes with things like

Re: [HACKERS] psql - better support pipe line

2015-08-26 Thread Pavel Stehule
Hi 2015-08-25 17:21 GMT+02:00 Tom Lane t...@sss.pgh.pa.us: Jim Nasby jim.na...@bluetreble.com writes: What I've had problems with is trying to correlate psql specified connection attributes with things like DBI. It would be nice if there was a way to get a fully formed connection URI for

Re: [HACKERS] psql - better support pipe line

2015-08-25 Thread Jim Nasby
On 8/24/15 3:04 PM, Pavel Stehule wrote: (1) there is no reason to believe that the db name and only the db name is needed to do another connection; what about port, host, user, etc? I have to agree - the possibilities is much more than database name - so one option is not good idea.

Re: [HACKERS] psql - better support pipe line

2015-08-25 Thread Tom Lane
Jim Nasby jim.na...@bluetreble.com writes: What I've had problems with is trying to correlate psql specified connection attributes with things like DBI. It would be nice if there was a way to get a fully formed connection URI for the current connection. Yeah, although I'd think the

Re: [HACKERS] psql - better support pipe line

2015-08-24 Thread Tom Lane
Heikki Linnakangas hlinn...@iki.fi writes: On 08/24/2015 08:06 AM, Pavel Stehule wrote: it works perfectly - but the line xargs -P 3 -I % sh -c psql % -q -c 'analyze pg_attribute'; echo % is little bit ugly - with some psql option it can be cleaned to xargs -P3 -I % psql % -q --echo-db -c

Re: [HACKERS] psql - better support pipe line

2015-08-24 Thread Andrew Dunstan
On 08/24/2015 06:49 AM, Heikki Linnakangas wrote: On 08/24/2015 08:06 AM, Pavel Stehule wrote: Hi I found so a set psql and xargs is pretty strong. But I miss a psql option for simple returning current database and continuing in pipeline. What I am doing: psql postgres -At -c select

Re: [HACKERS] psql - better support pipe line

2015-08-24 Thread Heikki Linnakangas
On 08/24/2015 08:06 AM, Pavel Stehule wrote: Hi I found so a set psql and xargs is pretty strong. But I miss a psql option for simple returning current database and continuing in pipeline. What I am doing: psql postgres -At -c select datname from pg_database | xargs -P 3 -I % psql % -At -c

Re: [HACKERS] psql - better support pipe line

2015-08-24 Thread Pavel Stehule
2015-08-24 12:49 GMT+02:00 Heikki Linnakangas hlinn...@iki.fi: On 08/24/2015 08:06 AM, Pavel Stehule wrote: Hi I found so a set psql and xargs is pretty strong. But I miss a psql option for simple returning current database and continuing in pipeline. What I am doing: psql postgres -At

Re: [HACKERS] psql - better support pipe line

2015-08-24 Thread Pavel Stehule
2015-08-24 16:02 GMT+02:00 Tom Lane t...@sss.pgh.pa.us: Heikki Linnakangas hlinn...@iki.fi writes: On 08/24/2015 08:06 AM, Pavel Stehule wrote: it works perfectly - but the line xargs -P 3 -I % sh -c psql % -q -c 'analyze pg_attribute'; echo % is little bit ugly - with some psql option

Re: [HACKERS] psql :: support for \ev viewname and \sv viewname

2015-07-22 Thread Dean Rasheed
On 3 July 2015 at 20:50, Tom Lane t...@sss.pgh.pa.us wrote: Petr Korobeinikov pkorobeini...@gmail.com writes: Fixed. Now both \ev and \sv numbering lines starting with 1. New version attached. Applied with a fair amount of mostly-cosmetic adjustment. As I've already noticed that

Re: [HACKERS] psql :: support for \ev viewname and \sv viewname

2015-07-22 Thread Tom Lane
Dean Rasheed dean.a.rash...@gmail.com writes: On 3 July 2015 at 20:50, Tom Lane t...@sss.pgh.pa.us wrote: Oh? If that were true, pg_dump wouldn't work on such views. It is kind of a PITA for this purpose that it doesn't include the CREATE text for you, but we're surely not changing that

Re: [HACKERS] psql tabcomplete - minor bugfix - tabcomplete for SET ROLE TO xxx

2015-07-08 Thread Pavel Stehule
2015-07-02 11:03 GMT+02:00 Heikki Linnakangas hlinn...@iki.fi: On 05/29/2015 10:41 AM, Pavel Stehule wrote: 2015-05-29 9:28 GMT+02:00 Jeevan Chalke jeevan.cha...@gmail.com: I agree with Peter that We don't tab-complete everything we possibly could, but using tabs after SET ROLE TO

Re: [HACKERS] psql :: support for \ev viewname and \sv viewname

2015-07-03 Thread Tom Lane
Jeevan Chalke jeevan.cha...@enterprisedb.com writes: Patch looks excellent now. No issues. Found a typo which I have fixed in the attached patch. Starting to look at this ... The business with numbering lines from SELECT seems to me to be completely nonsensical. In the first place, it fails

Re: [HACKERS] psql :: support for \ev viewname and \sv viewname

2015-07-03 Thread Petr Korobeinikov
пт, 3 июля 2015 г. в 19:30, Tom Lane t...@sss.pgh.pa.us: So AFAICS, \ev and \sv should just number lines straightforwardly, with 1 being the first line of the CREATE command text. Am I missing something? Fixed. Now both \ev and \sv numbering lines starting with 1. New version attached. As

Re: [HACKERS] psql :: support for \ev viewname and \sv viewname

2015-07-03 Thread Tom Lane
Petr Korobeinikov pkorobeini...@gmail.com writes: Fixed. Now both \ev and \sv numbering lines starting with 1. New version attached. Applied with a fair amount of mostly-cosmetic adjustment. As I've already noticed that pg_get_viewdef() does not support full syntax of creating or replacing

Re: [HACKERS] psql tabcomplete - minor bugfix - tabcomplete for SET ROLE TO xxx

2015-07-02 Thread Pavel Stehule
2015-07-02 11:03 GMT+02:00 Heikki Linnakangas hlinn...@iki.fi: On 05/29/2015 10:41 AM, Pavel Stehule wrote: 2015-05-29 9:28 GMT+02:00 Jeevan Chalke jeevan.cha...@gmail.com: I agree with Peter that We don't tab-complete everything we possibly could, but using tabs after SET ROLE TO

Re: [HACKERS] psql tabcomplete - minor bugfix - tabcomplete for SET ROLE TO xxx

2015-07-02 Thread Heikki Linnakangas
On 05/29/2015 10:41 AM, Pavel Stehule wrote: 2015-05-29 9:28 GMT+02:00 Jeevan Chalke jeevan.cha...@gmail.com: I agree with Peter that We don't tab-complete everything we possibly could, but using tabs after SET ROLE TO provides DEFAULT as an option which seems wrong. This patch adds list of

Re: [HACKERS] psql :: support for \ev viewname and \sv viewname

2015-06-09 Thread Jeevan Chalke
Hi Patch looks excellent now. No issues. Found a typo which I have fixed in the attached patch. Thanks -- Jeevan B Chalke Principal Software Engineer, Product Development EnterpriseDB Corporation The Enterprise PostgreSQL Company diff --git a/doc/src/sgml/ref/psql-ref.sgml

Re: [HACKERS] psql :: support for \ev viewname and \sv viewname

2015-06-09 Thread Jeevan Chalke
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: tested, passed Documentation:tested, passed Patch looks good to pass to committer. The new status of

Re: [HACKERS] psql :: support for \ev viewname and \sv viewname

2015-06-06 Thread Petr Korobeinikov
1. make failed with docs Fixed. 2. \ev vw1 3 This syntax is supported. But documentation only says: \ev [ viewname ] Missing optional line_number clause Fixed. Documented. 3. strip_lineno_from_objdesc(char *func) Can we have parameter name as obj instead of func. You have

Re: [HACKERS] psql :: support for \ev viewname and \sv viewname

2015-06-01 Thread Jeevan Chalke
The following review has been posted through the commitfest application: make installcheck-world: tested, failed Implements feature: tested, passed Spec compliant: tested, passed Documentation:tested, failed I have reviewed this patch. Most of the code is just

Re: [HACKERS] psql tabcomplete - minor bugfix - tabcomplete for SET ROLE TO xxx

2015-05-29 Thread Pavel Stehule
2015-05-29 9:28 GMT+02:00 Jeevan Chalke jeevan.cha...@gmail.com: The following review has been posted through the commitfest application: make installcheck-world: not tested Implements feature: tested, passed Spec compliant: tested, passed Documentation:not

Re: [HACKERS] psql tabcomplete - minor bugfix - tabcomplete for SET ROLE TO xxx

2015-05-29 Thread Jeevan Chalke
The following review has been posted through the commitfest application: make installcheck-world: not tested Implements feature: tested, passed Spec compliant: tested, passed Documentation:not tested I agree with Peter that We don't tab-complete everything we possibly

Re: [HACKERS] psql tabcomplete - minor bugfix - tabcomplete for SET ROLE TO xxx

2015-05-28 Thread Peter Eisentraut
On 5/22/15 6:35 AM, Pavel Stehule wrote: we support SET ROLE name and SET ROLE TO name. Second form isn't supported by tabcomplete. Attached trivial patch fixes it. We don't tab-complete everything we possibly could. The documentation only lists the first form, so I don't think we necessarily

Re: [HACKERS] psql :: support for \ev viewname and \sv viewname

2015-05-24 Thread Petr Korobeinikov
Just a merge after pgindent run (807b9e0dff663c5da875af7907a5106c0ff90673). psql-ev-sv-support-v3.diff Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] psql :: support for \ev viewname and \sv viewname

2015-05-14 Thread Petr A. Korobeinikov
This version contains one little change. In order to be consistent with “\d+ viewname” it uses pg_get_viewdef(oid, /* pretty */ true) to produce “pretty” output (without additional parentheses). psql-ev-sv-support-v2.diff Description: Binary data On 05 May 2015, at 16:42, Robert Haas

Re: [HACKERS] psql :: support for \ev viewname and \sv viewname

2015-05-05 Thread Robert Haas
On Mon, May 4, 2015 at 5:21 AM, Petr Korobeinikov pkorobeini...@gmail.com wrote: I'm proposing to add two new subcommands in psql: 1. \ev viewname - edit view definition with external editor (like \ef for function) 2. \sv viewname - show view definition (like \sf for function, for

Re: [HACKERS] psql :: support for \ev viewname and \sv viewname

2015-05-04 Thread Pavel Stehule
2015-05-04 11:21 GMT+02:00 Petr Korobeinikov pkorobeini...@gmail.com: Hackers! I'm proposing to add two new subcommands in psql: 1. \ev viewname - edit view definition with external editor (like \ef for function) 2. \sv viewname - show view definition (like \sf for function, for

Re: [HACKERS] psql :: support for \ev viewname and \sv viewname

2015-05-04 Thread Fabrízio de Royes Mello
On Mon, May 4, 2015 at 6:26 AM, Pavel Stehule pavel.steh...@gmail.com wrote: 2015-05-04 11:21 GMT+02:00 Petr Korobeinikov pkorobeini...@gmail.com: Hackers! I'm proposing to add two new subcommands in psql: 1. \ev viewname - edit view definition with external editor (like \ef for

Re: [HACKERS] psql showing owner in \dT

2015-04-09 Thread Magnus Hagander
On Thu, Apr 9, 2015 at 3:27 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Magnus Hagander wrote: After running into the need twice now - is there a particular reason why we don't have psql showing the owner of a type, at least in \dT+? Can't think of anything ... If not, how about

Re: [HACKERS] psql showing owner in \dT

2015-04-09 Thread Alvaro Herrera
Magnus Hagander wrote: After running into the need twice now - is there a particular reason why we don't have psql showing the owner of a type, at least in \dT+? Can't think of anything ... If not, how about attached trivial patch? Owner should normally be printed before ACL, no? --

Re: [HACKERS] psql doccumentation issue

2015-02-01 Thread Tom Lane
Dilip kumar dilip.ku...@huawei.com writes: There is some minor issue in psql documentations for \setenv Attached patch is fixing the same. Actual option \setenv NAME [VALUE] set or unset environment variable In document \setenv [ name [ value ] ] -- name is not optional so it should be

Re: [HACKERS] psql -c does not honor ON_ERROR_STOP

2015-01-07 Thread Joe Conway
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/06/2015 12:36 PM, Tom Lane wrote: -c submits the entire string to the backend in one PQexec(); therefore ON_ERROR_STOP cannot have any impact on its behavior. The backend will abandon processing the whole string upon first error, embedded

Re: [HACKERS] psql -c does not honor ON_ERROR_STOP

2015-01-06 Thread Tom Lane
Joe Conway joe.con...@credativ.com writes: This seems like either a psql bug or maybe just a documentation bug. I know the psql docs say that -c behavior can be surprising, but I find the below surprising even after reading the docs a couple of times. Given that ON_ERROR_STOP defaults to off,

Re: [HACKERS] psql tab completion: fix COMMENT ON ... IS IS IS

2014-12-31 Thread Robert Haas
On Sun, Dec 28, 2014 at 7:44 PM, Ian Barwick i...@2ndquadrant.com wrote: Currently tab completion for 'COMMENT ON {object} foo IS' will result in the 'IS' being duplicated up to two times; not a world-shattering issue I know, but the fix is trivial and I stumble over it often enough to for it

Re: [HACKERS] psql tab completion: fix COMMENT ON ... IS IS IS

2014-12-31 Thread Ian Barwick
On 15/01/01 1:07, Robert Haas wrote: On Sun, Dec 28, 2014 at 7:44 PM, Ian Barwick i...@2ndquadrant.com wrote: Currently tab completion for 'COMMENT ON {object} foo IS' will result in the 'IS' being duplicated up to two times; not a world-shattering issue I know, but the fix is trivial and I

Re: [HACKERS] psql \watch always ignores \pset null

2014-11-27 Thread Fujii Masao
On Wed, Nov 19, 2014 at 3:24 PM, Tom Lane t...@sss.pgh.pa.us wrote: Will Leinweber w...@heroku.com writes: On Tue, Nov 18, 2014 at 9:54 PM, Tom Lane t...@sss.pgh.pa.us wrote: Fujii Masao masao.fu...@gmail.com writes: Is there any reason why \watch must ignore \pset null setting? Hmmm ... the

Re: [HACKERS] psql \sf doesn't show it's SQL when ECHO_HIDDEN is on

2014-11-21 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: I noticed the other day that psql doesn't honor ECHO_HIDDEN for \sf. This looks on a somewhat cursory examination to be the only significant place that doesn't. Is there any reason for this, or should I just adjust it so that it uses PSQLexec like

Re: [HACKERS] psql \sf doesn't show it's SQL when ECHO_HIDDEN is on

2014-11-21 Thread Pavel Stehule
2014-11-21 16:46 GMT+01:00 Tom Lane t...@sss.pgh.pa.us: Andrew Dunstan and...@dunslane.net writes: I noticed the other day that psql doesn't honor ECHO_HIDDEN for \sf. This looks on a somewhat cursory examination to be the only significant place that doesn't. Is there any reason for this,

Re: [HACKERS] psql \sf doesn't show it's SQL when ECHO_HIDDEN is on

2014-11-21 Thread Andrew Dunstan
On 11/21/2014 11:11 AM, Pavel Stehule wrote: 2014-11-21 16:46 GMT+01:00 Tom Lane t...@sss.pgh.pa.us mailto:t...@sss.pgh.pa.us: Andrew Dunstan and...@dunslane.net mailto:and...@dunslane.net writes: I noticed the other day that psql doesn't honor ECHO_HIDDEN for \sf. This

Re: [HACKERS] psql \sf doesn't show it's SQL when ECHO_HIDDEN is on

2014-11-21 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: On 11/21/2014 11:11 AM, Pavel Stehule wrote: I noticed the other day that psql doesn't honor ECHO_HIDDEN for \sf. OK. it was so trivial I just did it. I think it may not be quite as trivial as that. In particular, PSQLexec already contains

Re: [HACKERS] psql \sf doesn't show it's SQL when ECHO_HIDDEN is on

2014-11-21 Thread Andrew Dunstan
On 11/21/2014 12:32 PM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: On 11/21/2014 11:11 AM, Pavel Stehule wrote: I noticed the other day that psql doesn't honor ECHO_HIDDEN for \sf. OK. it was so trivial I just did it. I think it may not be quite as trivial as that. In

Re: [HACKERS] psql \sf doesn't show it's SQL when ECHO_HIDDEN is on

2014-11-21 Thread Andrew Dunstan
On 11/21/2014 01:05 PM, Andrew Dunstan wrote: On 11/21/2014 12:32 PM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: On 11/21/2014 11:11 AM, Pavel Stehule wrote: I noticed the other day that psql doesn't honor ECHO_HIDDEN for \sf. OK. it was so trivial I just did it. I think

Re: [HACKERS] psql \sf doesn't show it's SQL when ECHO_HIDDEN is on

2014-11-21 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: Well, now we get things like this: ERROR: more than one function named abc LINE 1: SELECT 'abc'::pg_catalog.regproc::pg_catalog.oid whereas minimal_error_message suppressed the second line. If we want to preserve that older behaviour

Re: [HACKERS] psql \sf doesn't show it's SQL when ECHO_HIDDEN is on

2014-11-21 Thread Andrew Dunstan
On 11/21/2014 02:44 PM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: Well, now we get things like this: ERROR: more than one function named abc LINE 1: SELECT 'abc'::pg_catalog.regproc::pg_catalog.oid whereas minimal_error_message suppressed the second line. If we want

Re: [HACKERS] psql \sf doesn't show it's SQL when ECHO_HIDDEN is on

2014-11-21 Thread Andrew Dunstan
On 11/21/2014 02:44 PM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: Well, now we get things like this: ERROR: more than one function named abc LINE 1: SELECT 'abc'::pg_catalog.regproc::pg_catalog.oid whereas minimal_error_message suppressed the second line. If we want

Re: [HACKERS] psql \watch always ignores \pset null

2014-11-18 Thread Tom Lane
Fujii Masao masao.fu...@gmail.com writes: Hi, /* * Set up rendering options, in particular, disable the pager, because * nobody wants to be prompted while watching the output of 'watch'. */ myopt.nullPrint = NULL; myopt.topt.pager = 0; I found psql's \watch command always ignores \pset

Re: [HACKERS] psql \watch always ignores \pset null

2014-11-18 Thread Will Leinweber
On Tue, Nov 18, 2014 at 9:54 PM, Tom Lane t...@sss.pgh.pa.us wrote: Fujii Masao masao.fu...@gmail.com writes: Hi, /* * Set up rendering options, in particular, disable the pager, because * nobody wants to be prompted while watching the output of 'watch'. */ myopt.nullPrint = NULL;

Re: [HACKERS] psql \watch always ignores \pset null

2014-11-18 Thread Tom Lane
Will Leinweber w...@heroku.com writes: On Tue, Nov 18, 2014 at 9:54 PM, Tom Lane t...@sss.pgh.pa.us wrote: Fujii Masao masao.fu...@gmail.com writes: Is there any reason why \watch must ignore \pset null setting? Hmmm ... the comment offers a reasonable argument for forcing pager = 0, but I

Re: [HACKERS] psql tab completion: \c [ dbname [ username ] ]

2014-11-10 Thread Robert Haas
On Sun, Nov 9, 2014 at 6:13 PM, Ian Barwick i...@2ndquadrant.com wrote: Attached is a mighty trivial patch to extend psql tab completion for \c / \connect to generate a list of role names, as lack thereof was annoying me recently and I can't see any downside to doing this. Committed, thanks.

Re: [HACKERS] psql tab completion: \c [ dbname [ username ] ]

2014-11-10 Thread Ian Barwick
On 10/11/14 22:20, Robert Haas wrote: On Sun, Nov 9, 2014 at 6:13 PM, Ian Barwick i...@2ndquadrant.com wrote: Attached is a mighty trivial patch to extend psql tab completion for \c / \connect to generate a list of role names, as lack thereof was annoying me recently and I can't see any

Re: [HACKERS] psql output change in 9.4

2014-10-13 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: On Sun, Oct 12, 2014 at 12:17:31AM -0400, Peter Eisentraut wrote: Patch attached. I think this would be for 9.5 only, at this point. Funny, I was *just* working on that, too. I propose a patch that reverts the output to how it was in 9.3 (without

Re: [HACKERS] psql \watch versus \timing

2014-10-13 Thread Bruce Momjian
On Thu, Sep 4, 2014 at 10:50:58PM +0900, Michael Paquier wrote: On Thu, Sep 4, 2014 at 1:44 PM, Fujii Masao masao.fu...@gmail.com wrote: On Thu, Aug 28, 2014 at 8:46 PM, Fujii Masao masao.fu...@gmail.com wrote: Good catch. So I will remove start_xact code later. Attached patch removes

Re: [HACKERS] psql \watch versus \timing

2014-10-13 Thread Michael Paquier
On Tue, Oct 14, 2014 at 4:49 AM, Bruce Momjian br...@momjian.us wrote: On Thu, Sep 4, 2014 at 10:50:58PM +0900, Michael Paquier wrote: On Thu, Sep 4, 2014 at 1:44 PM, Fujii Masao masao.fu...@gmail.com wrote: On Thu, Aug 28, 2014 at 8:46 PM, Fujii Masao masao.fu...@gmail.com wrote: Good

Re: [HACKERS] psql output change in 9.4

2014-10-11 Thread Peter Eisentraut
On 10/11/14 8:25 PM, Bruce Momjian wrote: On Mon, Aug 11, 2014 at 02:28:45PM -0400, Robert Haas wrote: On Mon, Aug 11, 2014 at 1:52 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Fri, Aug 8, 2014 at 9:34 PM, Peter Eisentraut pete...@gmx.net wrote: What is

Re: [HACKERS] psql \watch versus \timing

2014-09-04 Thread Michael Paquier
On Thu, Sep 4, 2014 at 1:44 PM, Fujii Masao masao.fu...@gmail.com wrote: On Thu, Aug 28, 2014 at 8:46 PM, Fujii Masao masao.fu...@gmail.com wrote: Good catch. So I will remove start_xact code later. Attached patch removes start_xact from PSQLexec. Nothing negative to say here :) Patch simply

Re: [HACKERS] psql \watch versus \timing

2014-09-03 Thread Michael Paquier
On Mon, Sep 1, 2014 at 11:56 PM, Tom Lane t...@sss.pgh.pa.us wrote: Michael Paquier michael.paqu...@gmail.com writes: I just tested the patch and this feature works as expected if timing is on and it displays the individual run time of each query kicked by \watch. Note that --echo-hidden does

Re: [HACKERS] psql \watch versus \timing

2014-09-03 Thread Greg Stark
On Wed, Sep 3, 2014 at 12:48 PM, Michael Paquier michael.paqu...@gmail.com wrote: OK, then as all the comments are basically addressed, here is an updated patch correcting the comment problems mentioned by Heikki. I just tried this and found it doesn't cooperate well with AUTOCOMMIT = 'off' and

Re: [HACKERS] psql \watch versus \timing

2014-09-03 Thread Fujii Masao
On Wed, Sep 3, 2014 at 10:56 PM, Greg Stark st...@mit.edu wrote: On Wed, Sep 3, 2014 at 12:48 PM, Michael Paquier michael.paqu...@gmail.com wrote: OK, then as all the comments are basically addressed, here is an updated patch correcting the comment problems mentioned by Heikki. Thanks a lot!

Re: [HACKERS] psql \watch versus \timing

2014-09-03 Thread Fujii Masao
On Wed, Sep 3, 2014 at 11:13 PM, Fujii Masao masao.fu...@gmail.com wrote: On Wed, Sep 3, 2014 at 10:56 PM, Greg Stark st...@mit.edu wrote: On Wed, Sep 3, 2014 at 12:48 PM, Michael Paquier michael.paqu...@gmail.com wrote: OK, then as all the comments are basically addressed, here is an updated

Re: [HACKERS] psql \watch versus \timing

2014-09-03 Thread Fujii Masao
On Thu, Aug 28, 2014 at 8:46 PM, Fujii Masao masao.fu...@gmail.com wrote: On Tue, Aug 26, 2014 at 4:55 AM, Heikki Linnakangas hlinnakan...@vmware.com wrote: On 08/25/2014 10:48 PM, Heikki Linnakangas wrote: On 08/25/2014 09:22 PM, Fujii Masao wrote: On Tue, Aug 26, 2014 at 1:34 AM, Heikki

Re: [HACKERS] psql \watch versus \timing

2014-09-01 Thread Michael Paquier
On Fri, Aug 29, 2014 at 6:33 PM, Heikki Linnakangas hlinnakan...@vmware.com wrote: On 08/28/2014 02:46 PM, Fujii Masao wrote: On Tue, Aug 26, 2014 at 4:55 AM, Heikki Linnakangas hlinnakan...@vmware.com wrote: On 08/25/2014 10:48 PM, Heikki Linnakangas wrote: Actually, perhaps it would be

Re: [HACKERS] psql \watch versus \timing

2014-09-01 Thread Tom Lane
Michael Paquier michael.paqu...@gmail.com writes: I just tested the patch and this feature works as expected if timing is on and it displays the individual run time of each query kicked by \watch. Note that --echo-hidden does not display the query run during each loop and that this is contrary

Re: [HACKERS] psql \watch versus \timing

2014-08-29 Thread Heikki Linnakangas
On 08/28/2014 02:46 PM, Fujii Masao wrote: On Tue, Aug 26, 2014 at 4:55 AM, Heikki Linnakangas hlinnakan...@vmware.com wrote: On 08/25/2014 10:48 PM, Heikki Linnakangas wrote: Actually, perhaps it would be better to just copy-paste PSQLexec, and modify the copy to suite \watch's needs.

Re: [HACKERS] psql \watch versus \timing

2014-08-28 Thread Fujii Masao
On Tue, Aug 26, 2014 at 4:55 AM, Heikki Linnakangas hlinnakan...@vmware.com wrote: On 08/25/2014 10:48 PM, Heikki Linnakangas wrote: On 08/25/2014 09:22 PM, Fujii Masao wrote: On Tue, Aug 26, 2014 at 1:34 AM, Heikki Linnakangas hlinnakan...@vmware.com wrote: I agree that refactoring this

Re: [HACKERS] psql \watch versus \timing

2014-08-25 Thread Heikki Linnakangas
On 08/18/2014 10:51 AM, Michael Paquier wrote: On Mon, Aug 18, 2014 at 4:12 PM, Fujii Masao masao.fu...@gmail.com wrote: On Mon, Aug 18, 2014 at 3:19 PM, Michael Paquier michael.paqu...@gmail.com wrote: On Thu, Aug 14, 2014 at 11:10 PM, Fujii Masao masao.fu...@gmail.com wrote: Attached patch

Re: [HACKERS] psql \watch versus \timing

2014-08-25 Thread Fujii Masao
On Tue, Aug 26, 2014 at 1:34 AM, Heikki Linnakangas hlinnakan...@vmware.com wrote: On 08/18/2014 10:51 AM, Michael Paquier wrote: On Mon, Aug 18, 2014 at 4:12 PM, Fujii Masao masao.fu...@gmail.com wrote: On Mon, Aug 18, 2014 at 3:19 PM, Michael Paquier michael.paqu...@gmail.com wrote: On

Re: [HACKERS] psql \watch versus \timing

2014-08-25 Thread Heikki Linnakangas
On 08/25/2014 09:22 PM, Fujii Masao wrote: On Tue, Aug 26, 2014 at 1:34 AM, Heikki Linnakangas hlinnakan...@vmware.com wrote: I agree that refactoring this would be nice in the long-term, and I also agree that it's probably OK as it is in the short-term. I don't like the name PSQLexecInternal,

Re: [HACKERS] psql \watch versus \timing

2014-08-25 Thread Heikki Linnakangas
On 08/25/2014 10:48 PM, Heikki Linnakangas wrote: On 08/25/2014 09:22 PM, Fujii Masao wrote: On Tue, Aug 26, 2014 at 1:34 AM, Heikki Linnakangas hlinnakan...@vmware.com wrote: I agree that refactoring this would be nice in the long-term, and I also agree that it's probably OK as it is in the

Re: [HACKERS] psql \watch versus \timing

2014-08-18 Thread Michael Paquier
On Thu, Aug 14, 2014 at 11:10 PM, Fujii Masao masao.fu...@gmail.com wrote: Attached patch changes \watch so that it displays how long the query takes if \timing is enabled. I didn't refactor PSQLexec and SendQuery into one routine because the contents of those functions are not so same. I'm

Re: [HACKERS] psql \watch versus \timing

2014-08-18 Thread Fujii Masao
On Mon, Aug 18, 2014 at 3:19 PM, Michael Paquier michael.paqu...@gmail.com wrote: On Thu, Aug 14, 2014 at 11:10 PM, Fujii Masao masao.fu...@gmail.com wrote: Attached patch changes \watch so that it displays how long the query takes if \timing is enabled. I didn't refactor PSQLexec and

Re: [HACKERS] psql \watch versus \timing

2014-08-18 Thread Michael Paquier
On Mon, Aug 18, 2014 at 4:12 PM, Fujii Masao masao.fu...@gmail.com wrote: On Mon, Aug 18, 2014 at 3:19 PM, Michael Paquier michael.paqu...@gmail.com wrote: On Thu, Aug 14, 2014 at 11:10 PM, Fujii Masao masao.fu...@gmail.com wrote: Attached patch changes \watch so that it displays how long the

Re: [HACKERS] psql \watch versus \timing

2014-08-14 Thread Fujii Masao
On Mon, May 20, 2013 at 7:33 AM, Tom Lane t...@sss.pgh.pa.us wrote: Jeff Janes jeff.ja...@gmail.com writes: I'd like to run same query repeatedly and see how long it takes each time. I thought \watch would be excellent for this, but it turns out that using \watch suppresses the output of

Re: [HACKERS] psql: show only failed queries

2014-08-11 Thread Fujii Masao
On Sat, Aug 9, 2014 at 4:16 AM, Pavel Stehule pavel.steh...@gmail.com wrote: Hi 2014-08-08 13:58 GMT+02:00 Fujii Masao masao.fu...@gmail.com: On Fri, Aug 8, 2014 at 4:31 AM, Pavel Stehule pavel.steh...@gmail.com wrote: 2014-08-07 7:10 GMT+02:00 Fujii Masao masao.fu...@gmail.com:

Re: [HACKERS] psql output change in 9.4

2014-08-11 Thread Robert Haas
On Fri, Aug 8, 2014 at 9:34 PM, Peter Eisentraut pete...@gmx.net wrote: This is 9.3: peter=# \a Output format is unaligned. peter=# \a Output format is aligned. peter=# \x Expanded display is on. peter=# \x Expanded display is off. This is new in 9.4: peter=# \a Output format

Re: [HACKERS] psql output change in 9.4

2014-08-11 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Fri, Aug 8, 2014 at 9:34 PM, Peter Eisentraut pete...@gmx.net wrote: What is the point of that change? I think the output could justly be criticized for making it insufficiently clear that the parenthesized text is, in fact, the name of the pset

Re: [HACKERS] psql output change in 9.4

2014-08-11 Thread Pavel Stehule
2014-08-11 19:52 GMT+02:00 Tom Lane t...@sss.pgh.pa.us: Robert Haas robertmh...@gmail.com writes: On Fri, Aug 8, 2014 at 9:34 PM, Peter Eisentraut pete...@gmx.net wrote: What is the point of that change? I think the output could justly be criticized for making it insufficiently clear

Re: [HACKERS] psql output change in 9.4

2014-08-11 Thread Robert Haas
On Mon, Aug 11, 2014 at 1:52 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Fri, Aug 8, 2014 at 9:34 PM, Peter Eisentraut pete...@gmx.net wrote: What is the point of that change? I think the output could justly be criticized for making it insufficiently

Re: [HACKERS] psql: show only failed queries

2014-08-11 Thread Pavel Stehule
2014-08-11 14:59 GMT+02:00 Fujii Masao masao.fu...@gmail.com: On Sat, Aug 9, 2014 at 4:16 AM, Pavel Stehule pavel.steh...@gmail.com wrote: Hi 2014-08-08 13:58 GMT+02:00 Fujii Masao masao.fu...@gmail.com: On Fri, Aug 8, 2014 at 4:31 AM, Pavel Stehule pavel.steh...@gmail.com wrote:

Re: [HACKERS] psql: show only failed queries

2014-08-11 Thread Fujii Masao
On Tue, Aug 12, 2014 at 4:41 AM, Pavel Stehule pavel.steh...@gmail.com wrote: 2014-08-11 14:59 GMT+02:00 Fujii Masao masao.fu...@gmail.com: On Sat, Aug 9, 2014 at 4:16 AM, Pavel Stehule pavel.steh...@gmail.com wrote: Hi 2014-08-08 13:58 GMT+02:00 Fujii Masao masao.fu...@gmail.com:

Re: [HACKERS] psql: show only failed queries

2014-08-11 Thread Pavel Stehule
Oh, just revived that code. yes, It is looking well Ok, committed! super thank you very much Regards Pavel Regards, -- Fujii Masao

Re: [HACKERS] psql: show only failed queries

2014-08-08 Thread Fujii Masao
On Fri, Aug 8, 2014 at 4:31 AM, Pavel Stehule pavel.steh...@gmail.com wrote: 2014-08-07 7:10 GMT+02:00 Fujii Masao masao.fu...@gmail.com: On Thu, Aug 7, 2014 at 6:26 AM, Pavel Stehule pavel.steh...@gmail.com wrote: Hello updated version patch in attachment Thanks! But ISTM you

Re: [HACKERS] psql: show only failed queries

2014-08-08 Thread Pavel Stehule
Hi 2014-08-08 13:58 GMT+02:00 Fujii Masao masao.fu...@gmail.com: On Fri, Aug 8, 2014 at 4:31 AM, Pavel Stehule pavel.steh...@gmail.com wrote: 2014-08-07 7:10 GMT+02:00 Fujii Masao masao.fu...@gmail.com: On Thu, Aug 7, 2014 at 6:26 AM, Pavel Stehule pavel.steh...@gmail.com wrote:

Re: [HACKERS] psql: show only failed queries

2014-08-07 Thread Pavel Stehule
2014-08-07 7:10 GMT+02:00 Fujii Masao masao.fu...@gmail.com: On Thu, Aug 7, 2014 at 6:26 AM, Pavel Stehule pavel.steh...@gmail.com wrote: Hello updated version patch in attachment Thanks! But ISTM you forgot to attached the patch. grr .. I am sorry +/* all psql known

Re: [HACKERS] psql: show only failed queries

2014-08-06 Thread Pavel Stehule
Hello updated version patch in attachment 2014-08-05 13:31 GMT+02:00 Fujii Masao masao.fu...@gmail.com: On Wed, Jul 16, 2014 at 4:34 AM, Pavel Stehule pavel.steh...@gmail.com wrote: 2014-07-15 12:07 GMT+02:00 Fujii Masao masao.fu...@gmail.com: On Tue, Jul 15, 2014 at 7:01 PM,

Re: [HACKERS] psql: show only failed queries

2014-08-06 Thread Fujii Masao
On Thu, Aug 7, 2014 at 6:26 AM, Pavel Stehule pavel.steh...@gmail.com wrote: Hello updated version patch in attachment Thanks! But ISTM you forgot to attached the patch. +/* all psql known variables are included in list by default */ +for (known_varname = known_varnames;

Re: [HACKERS] psql: show only failed queries

2014-08-05 Thread Fujii Masao
On Wed, Jul 16, 2014 at 4:34 AM, Pavel Stehule pavel.steh...@gmail.com wrote: 2014-07-15 12:07 GMT+02:00 Fujii Masao masao.fu...@gmail.com: On Tue, Jul 15, 2014 at 7:01 PM, Pavel Stehule pavel.steh...@gmail.com wrote: 2014-07-15 11:29 GMT+02:00 Fujii Masao masao.fu...@gmail.com:

Re: [HACKERS] psql: show only failed queries

2014-07-15 Thread Fujii Masao
On Thu, Jul 10, 2014 at 9:56 PM, Pavel Stehule pavel.steh...@gmail.com wrote: Hello here is a proposed patch - autocomplete for known psql variable content Even after applying the patch, the following psql variables were not displayed on the tab-completion of \set command. HISTFILE HISTSIZE

Re: [HACKERS] psql: show only failed queries

2014-07-15 Thread Pavel Stehule
2014-07-15 11:29 GMT+02:00 Fujii Masao masao.fu...@gmail.com: On Thu, Jul 10, 2014 at 9:56 PM, Pavel Stehule pavel.steh...@gmail.com wrote: Hello here is a proposed patch - autocomplete for known psql variable content Even after applying the patch, the following psql variables were not

Re: [HACKERS] psql: show only failed queries

2014-07-15 Thread Fujii Masao
On Tue, Jul 15, 2014 at 7:01 PM, Pavel Stehule pavel.steh...@gmail.com wrote: 2014-07-15 11:29 GMT+02:00 Fujii Masao masao.fu...@gmail.com: On Thu, Jul 10, 2014 at 9:56 PM, Pavel Stehule pavel.steh...@gmail.com wrote: Hello here is a proposed patch - autocomplete for known psql

Re: [HACKERS] psql: show only failed queries

2014-07-15 Thread Pavel Stehule
2014-07-15 12:07 GMT+02:00 Fujii Masao masao.fu...@gmail.com: On Tue, Jul 15, 2014 at 7:01 PM, Pavel Stehule pavel.steh...@gmail.com wrote: 2014-07-15 11:29 GMT+02:00 Fujii Masao masao.fu...@gmail.com: On Thu, Jul 10, 2014 at 9:56 PM, Pavel Stehule pavel.steh...@gmail.com wrote:

Re: [HACKERS] psql \db+ lack of size column

2014-07-14 Thread Alvaro Herrera
Fabrízio de Royes Mello wrote: On Fri, May 16, 2014 at 2:03 AM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: Hi all, Are there some reason to don't show the tablespace size in the \db+ psql command? The attached patch show tablespace size in \db+ psql command. Thanks,

Re: [HACKERS] psql: show only failed queries

2014-07-10 Thread Pavel Stehule
2014-07-10 7:32 GMT+02:00 Fujii Masao masao.fu...@gmail.com: On Wed, Jul 9, 2014 at 9:44 PM, Pavel Stehule pavel.steh...@gmail.com wrote: Barring any objection, I will commit this patch except tab-completion part. Committed. Thank you very much It can be a second discussion, but I

Re: [HACKERS] psql: show only failed queries

2014-07-10 Thread Pavel Stehule
Hello here is a proposed patch - autocomplete for known psql variable content Regards Pavel 2014-07-10 9:50 GMT+02:00 Pavel Stehule pavel.steh...@gmail.com: 2014-07-10 7:32 GMT+02:00 Fujii Masao masao.fu...@gmail.com: On Wed, Jul 9, 2014 at 9:44 PM, Pavel Stehule

Re: [HACKERS] psql: show only failed queries

2014-07-09 Thread Pavel Stehule
Hi 2014-07-09 7:07 GMT+02:00 Fujii Masao masao.fu...@gmail.com: On Mon, Jun 30, 2014 at 8:33 PM, Pavel Stehule pavel.steh...@gmail.com wrote: 2014-06-30 13:01 GMT+02:00 Abhijit Menon-Sen a...@2ndquadrant.com: At 2014-06-30 12:48:30 +0200, pavel.steh...@gmail.com wrote: +

Re: [HACKERS] psql: show only failed queries

2014-07-09 Thread Fujii Masao
On Wed, Jul 9, 2014 at 9:06 PM, Pavel Stehule pavel.steh...@gmail.com wrote: Hi 2014-07-09 7:07 GMT+02:00 Fujii Masao masao.fu...@gmail.com: On Mon, Jun 30, 2014 at 8:33 PM, Pavel Stehule pavel.steh...@gmail.com wrote: 2014-06-30 13:01 GMT+02:00 Abhijit Menon-Sen

Re: [HACKERS] psql: show only failed queries

2014-07-09 Thread Pavel Stehule
2014-07-09 14:39 GMT+02:00 Fujii Masao masao.fu...@gmail.com: On Wed, Jul 9, 2014 at 9:06 PM, Pavel Stehule pavel.steh...@gmail.com wrote: Hi 2014-07-09 7:07 GMT+02:00 Fujii Masao masao.fu...@gmail.com: On Mon, Jun 30, 2014 at 8:33 PM, Pavel Stehule pavel.steh...@gmail.com

<    1   2   3   4   5   6   7   8   9   10   >