Re: [HACKERS] One-shot expanded output in psql using \G

2017-01-31 Thread Daniel Verite
Stephen Frost wrote: > That's not how '\dx' works, as I pointed out, so I don't see having the > second character being 'x' to imply "\x mode" makes sense. \gx means "like \g but output with expanded display" It turns out that it's semantically close to "\g with \x" so I refered to it

Re: [HACKERS] One-shot expanded output in psql using \G

2017-01-30 Thread David Fetter
On Mon, Jan 30, 2017 at 08:22:40AM -0700, David G. Johnston wrote: > On Mon, Jan 30, 2017 at 8:14 AM, Tom Lane wrote: > > Stephen Frost writes: > > > This particular bike-shedding really doesn't seem to be terribly useful > > > or sensible, to me. \gx

Re: [HACKERS] One-shot expanded output in psql using \G

2017-01-30 Thread Stephen Frost
David, * David G. Johnston (david.g.johns...@gmail.com) wrote: > On Mon, Jan 30, 2017 at 8:35 AM, Stephen Frost wrote: > > * Tom Lane (t...@sss.pgh.pa.us) wrote: > > > Stephen Frost writes: > > > > This particular bike-shedding really doesn't seem to be

Re: [HACKERS] One-shot expanded output in psql using \G

2017-01-30 Thread David G. Johnston
On Mon, Jan 30, 2017 at 8:35 AM, Stephen Frost wrote: > Tom, > > * Tom Lane (t...@sss.pgh.pa.us) wrote: > > Stephen Frost writes: > > > This particular bike-shedding really doesn't seem to be terribly useful > > > or sensible, to me. \gx isn't

Re: [HACKERS] One-shot expanded output in psql using \G

2017-01-30 Thread Tom Lane
Stephen Frost writes: > * Tom Lane (t...@sss.pgh.pa.us) wrote: >> Why not? To me it reads as "\g with an x option". The "x" refers to >> the implied "\x", so it's not an arbitrary choice at all. > That's not how '\dx' works, as I pointed out, so I don't see having the >

Re: [HACKERS] One-shot expanded output in psql using \G

2017-01-30 Thread David G. Johnston
On Mon, Jan 30, 2017 at 8:14 AM, Tom Lane wrote: > Stephen Frost writes: > > This particular bike-shedding really doesn't seem to be terribly useful > > or sensible, to me. \gx isn't "consistent" or "descriptive", frankly. > > Why not? To me it reads as

Re: [HACKERS] One-shot expanded output in psql using \G

2017-01-30 Thread Stephen Frost
Tom, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Stephen Frost writes: > > This particular bike-shedding really doesn't seem to be terribly useful > > or sensible, to me. \gx isn't "consistent" or "descriptive", frankly. > > Why not? To me it reads as "\g with an x option".

Re: [HACKERS] One-shot expanded output in psql using \G

2017-01-30 Thread Christoph Berg
Re: Tom Lane 2017-01-30 <23622.1485788...@sss.pgh.pa.us> > FWIW, \gx makes sense to me as well, particularly if we make it a > complete extension of \g and allow an optional target file name. > Does that functionality exist in mysql's \G ? MySQL's (5.5 here) \G does not support a filename

Re: [HACKERS] One-shot expanded output in psql using \G

2017-01-30 Thread Tom Lane
Stephen Frost writes: > This particular bike-shedding really doesn't seem to be terribly useful > or sensible, to me. \gx isn't "consistent" or "descriptive", frankly. Why not? To me it reads as "\g with an x option". The "x" refers to the implied "\x", so it's not an

Re: [HACKERS] One-shot expanded output in psql using \G

2017-01-30 Thread Stephen Frost
* Pavel Stehule (pavel.steh...@gmail.com) wrote: > 2017-01-30 14:46 GMT+01:00 Stephen Frost : > > > * Christoph Berg (christoph.b...@credativ.de) wrote: > > > Re: Daniel Verite 2017-01-28 <74e7fd23-f5a9-488d-a8c4- > > 1e0da674b...@manitou-mail.org> > > > > > Mysql's CLI client

Re: [HACKERS] One-shot expanded output in psql using \G

2017-01-30 Thread Tom Lane
"Daniel Verite" writes: >> \G will be much easier to explain to existing users (both people >> coming from MySQL to PostgreSQL, and PostgreSQL users doing a detour >> into foreign territory), and it would be one difference less to have >> to care about when typing on the

Re: [HACKERS] One-shot expanded output in psql using \G

2017-01-30 Thread Daniel Verite
Christoph Berg wrote: > But do we really want to choose > something different just because MySQL is using it? That's not what I meant. If mysql wasn't using \G I'd still suggest the name \gx because: - it means the functionality of \g combined with \x so semantically it makes sense. -

Re: [HACKERS] One-shot expanded output in psql using \G

2017-01-30 Thread Pavel Stehule
2017-01-30 14:46 GMT+01:00 Stephen Frost : > * Christoph Berg (christoph.b...@credativ.de) wrote: > > Re: Daniel Verite 2017-01-28 <74e7fd23-f5a9-488d-a8c4- > 1e0da674b...@manitou-mail.org> > > > > Mysql's CLI client is using \G for this purpose, and adding the very > > > >

Re: [HACKERS] One-shot expanded output in psql using \G

2017-01-30 Thread Stephen Frost
* Christoph Berg (christoph.b...@credativ.de) wrote: > Re: Daniel Verite 2017-01-28 > <74e7fd23-f5a9-488d-a8c4-1e0da674b...@manitou-mail.org> > > > Mysql's CLI client is using \G for this purpose, and adding the very > > > same functionality to psql fits nicely into the set of existing > > >

Re: [HACKERS] One-shot expanded output in psql using \G

2017-01-30 Thread Christoph Berg
Re: Daniel Verite 2017-01-28 <74e7fd23-f5a9-488d-a8c4-1e0da674b...@manitou-mail.org> > > Mysql's CLI client is using \G for this purpose, and adding the very > > same functionality to psql fits nicely into the set of existing > > backslash commands: \g sends the query buffer, \G will do exactly

Re: [HACKERS] One-shot expanded output in psql using \G

2017-01-28 Thread Cat
On Fri, Jan 27, 2017 at 11:03:05AM -0500, Stephen Frost wrote: > Well, I did get the impression that you weren't thinking about that, > which is actually kind of surpirsing to me. Lots of things work on "the > current query buffer", which is the last query (successful or not, to be > clear..): >

Re: [HACKERS] One-shot expanded output in psql using \G

2017-01-28 Thread Daniel Verite
Christoph Berg wrote: > A workaround is to submit queries using "\x\g\x", but that's ugly, > clutters the output with toggle messages, and will forget that "\x > auto" was set. > > Mysql's CLI client is using \G for this purpose, and adding the very > same functionality to psql fits

Re: [HACKERS] One-shot expanded output in psql using \G

2017-01-27 Thread Christoph Berg
Re: Stephen Frost 2017-01-27 <20170127160544.gi9...@tamriel.snowman.net> > > > Uh, I figured it was more like \g, which just re-runs the last query.. > > > As in, you'd do: > > > > > > table pg_proc; % blargh, I can't read it like this > > > \G % ahh, much nicer > > > > Sure, that's exactly the

Re: [HACKERS] One-shot expanded output in psql using \G

2017-01-27 Thread Stephen Frost
* Alvaro Herrera (alvhe...@2ndquadrant.com) wrote: > Stephen Frost wrote: > > * Alvaro Herrera (alvhe...@2ndquadrant.com) wrote: > > > > I think the suggestion is that \G replaces \g (which is the same thing > > > as the semicolon). So you would do this: > > > > > > SELECT * FROM table WHERE

Re: [HACKERS] One-shot expanded output in psql using \G

2017-01-27 Thread Stephen Frost
* David G. Johnston (david.g.johns...@gmail.com) wrote: > On Fri, Jan 27, 2017 at 8:31 AM, Stephen Frost wrote: > > > * Alvaro Herrera (alvhe...@2ndquadrant.com) wrote: > > > D'Arcy Cain wrote: > > > > > > > I am a pretty heavy user of psql but I don't think that that would

Re: [HACKERS] One-shot expanded output in psql using \G

2017-01-27 Thread David G. Johnston
On Fri, Jan 27, 2017 at 8:31 AM, Stephen Frost wrote: > * Alvaro Herrera (alvhe...@2ndquadrant.com) wrote: > > D'Arcy Cain wrote: > > > > > I am a pretty heavy user of psql but I don't think that that would be > so > > > helpful. I assume you mean a new option, let's call it

Re: [HACKERS] One-shot expanded output in psql using \G

2017-01-27 Thread Alvaro Herrera
Stephen Frost wrote: > * Alvaro Herrera (alvhe...@2ndquadrant.com) wrote: > > I think the suggestion is that \G replaces \g (which is the same thing > > as the semicolon). So you would do this: > > > > SELECT * FROM table WHERE table_status = 1; % get a short list; normal > > output > > SELECT

Re: [HACKERS] One-shot expanded output in psql using \G

2017-01-27 Thread Stephen Frost
* Alvaro Herrera (alvhe...@2ndquadrant.com) wrote: > D'Arcy Cain wrote: > > > I am a pretty heavy user of psql but I don't think that that would be so > > helpful. I assume you mean a new option, let's call it "\X" the causes the > > next query to be expanded. I type "\X" then a query. I

Re: [HACKERS] One-shot expanded output in psql using \G

2017-01-27 Thread Alvaro Herrera
D'Arcy Cain wrote: > I am a pretty heavy user of psql but I don't think that that would be so > helpful. I assume you mean a new option, let's call it "\X" the causes the > next query to be expanded. I type "\X" then a query. I realize that I made > a mistake and have to redo the query so I

Re: [HACKERS] One-shot expanded output in psql using \G

2017-01-27 Thread D'Arcy Cain
On 2017-01-27 10:05 AM, David Fetter wrote: On Fri, Jan 27, 2017 at 02:27:37PM +0100, Christoph Berg wrote: I frequently find myself in the situation that I want the "\x" expanded output mode activated just for one query. There's little wrong with typing "\x" and re-executing the query in that

Re: [HACKERS] One-shot expanded output in psql using \G

2017-01-27 Thread David Fetter
On Fri, Jan 27, 2017 at 02:27:37PM +0100, Christoph Berg wrote: > I frequently find myself in the situation that I want the "\x" > expanded output mode activated just for one query. There's little > wrong with typing "\x" and re-executing the query in that case, but > then I'm always annoyed that

Re: [HACKERS] One-shot expanded output in psql using \G

2017-01-27 Thread Christoph Berg
Re: To PostgreSQL Hackers 2017-01-27 <20170127132737.6skslelaf4txs...@msg.credativ.de> > The same idea was discussed back in 2008. Back then the outcome was > that "\x auto" was implemented, but I still think that \G is a useful > feature to have on its own, and several people in the thread seem

Re: [HACKERS] One-shot expanded output in psql using \G

2017-01-27 Thread Stephen Frost
Christoph, * Christoph Berg (christoph.b...@credativ.de) wrote: > The same idea was discussed back in 2008. Back then the outcome was > that "\x auto" was implemented, but I still think that \G is a useful > feature to have on its own, and several people in the thread seem to > have agreed back

[HACKERS] One-shot expanded output in psql using \G

2017-01-27 Thread Christoph Berg
I frequently find myself in the situation that I want the "\x" expanded output mode activated just for one query. There's little wrong with typing "\x" and re-executing the query in that case, but then I'm always annoyed that the expanded output is still active for the next query after that. "\x