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 wrote: > > Fujii Masao 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.page

Re: [HACKERS] patch to add \watch to psql

2013-04-04 Thread Will Leinweber
On Thu, Apr 4, 2013 at 5:04 PM, Tom Lane wrote: > > I whacked this around some more, added basic docs, and committed it. > > Thanks! > > Unfortunately rl_clear_screen() is not included at all in libedit, > causing > > compilation to fail, and I was completely unable to find a way to > > distin

Re: [HACKERS] patch to add \watch to psql

2013-04-03 Thread Will Leinweber
Here is an updated patch that addresses several of the points brought up so far, such as the sleep, internationalization banner, and zero wait check, and it removes the premature input check. Unfortunately rl_clear_screen() is not included at all in libedit, causing compilation to fail, and I was

[HACKERS] Clang compiler warning on 9.3 HEAD

2013-04-03 Thread Will Leinweber
On ref 8507907 when compiling with clang on os x, I got this warning which seems like a possible bug. I thought to report this because I imagine clang isn't frequently used day-to-day by most. dependency.c:213:36: warning: implicit conversion from enumeration type 'ObjectClass' (aka 'enum ObjectC

Re: [HACKERS] json api WIP patch

2013-02-04 Thread Will Leinweber
On Mon, Feb 4, 2013 at 11:38 AM, Robert Haas wrote: > > I suspect both of those are pretty safe from an SQL standards point of > view. Of course, as Tom is often wont to point out, the SQL standards > committee sometimes does bizarre things, so nothing's perfect, but I'd > be rather shocked if an

[HACKERS] patch to add \watch to psql

2012-10-19 Thread Will Leinweber
This patch adds \watch to psql. It is much like the unix equivalent, defaulting to every 2 seconds, and allowing you optionally specify a number of seconds. I will add this to the commit fest app. Thanks, Will Leinweber Example: psql (9.3devel, server 9.1.4) Type "help" for h

[HACKERS] query planner does not canonicalize infix operators

2012-03-12 Thread Will Leinweber
I created an index on an hstore function, fetchval(hstore, text), however when I use the -> infix operator which resolves to the very same function, this index is not used. It should be used. I have included an example: Table with hstore index: de10keipt01939=> \d log_data

Re: [HACKERS] feature request: auto savepoint for interactive psql when in transaction.

2011-11-14 Thread Will Leinweber
My coworker Dan suggested that some people copy and paste scripts. However I feel that that is an orthogonal problem and if there is a very high rate of input psql should detect that and turn interactive off. And I still strongly feel that on_error_rollback=interactive should be the default. Until

Re: [HACKERS] feature request: auto savepoint for interactive psql when in transaction.

2011-09-28 Thread Will Leinweber
On Wed, Sep 28, 2011 at 10:39 AM, Marko Tiikkaja wrote: >  Simply add this to your .psqlrc: > > \set ON_ERROR_ROLLBACK on Thank you Marko and Alvaro for pointing me in the right direction. I set it to 'interactive', which I think makes the most sense. I do wish this behavior was a little more d

[HACKERS] feature request: auto savepoint for interactive psql when in transaction.

2011-09-28 Thread Will Leinweber
I ruined a 5 hour UPDATE by typoing a table name on a SELECT to verify the update worked. I suppose I have no one else to blame, but it was really frustrating, to say the least. I assume this has happened to others as well. I only later found out about SAVEPOINT, which I immediately ran the next t