Re: [HACKERS] [patch] \crosstabview documentation
David G. Johnston wrote: > > So I guess: > > " > crosstabview with only 2 output columns > " > > https://wiki.postgresql.org/wiki/Crosstabview > (last section on that page) > > never got implemented It was implemented but eventually removed. I will update shortly this wiki page to reflect the status of the feature as commited. ATM it features what was still under review a few weeks ago, and it changed quite a bit eventually, notably on the point you mention and on the sort capability. Best regards, -- Daniel Vérité PostgreSQL-powered mailer: http://www.manitou-mail.org Twitter: @DanielVerite -- 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] [patch] \crosstabview documentation
David G. Johnston wrote: > " > crosstabview with only 2 output columns > " > > https://wiki.postgresql.org/wiki/Crosstabview > (last section on that page) > > never got implemented It was implemented in Daniel's patch. I removed it before commit and failed to notice the reference in the docs and help. (The reason I removed it is that it seemed to me that hardcoding it to the character X was going to become a nuisance in the future -- I mean why not ☒ ? It's simple to do at the query level by having the character as a literal in the third column. -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- 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] [patch] \crosstabview documentation
On Wed, Apr 13, 2016 at 12:29 PM, Tom Lane wrote: > Christoph Berg writes: > > Another thing about \crosstabview: > > > # select 1,2 \crosstabview > > The query must return at least two columns to be shown in crosstab > > > s/two/three/, I guess. > > Yeah, I noticed that. See > http://www.postgresql.org/message-id/10276.1460569...@sss.pgh.pa.us > > So I guess: " crosstabview with only 2 output columns " https://wiki.postgresql.org/wiki/Crosstabview (last section on that page) never got implemented David J.
Re: [HACKERS] [patch] \crosstabview documentation
Christoph Berg writes: > Another thing about \crosstabview: > # select 1,2 \crosstabview > The query must return at least two columns to be shown in crosstab > s/two/three/, I guess. Yeah, I noticed that. See http://www.postgresql.org/message-id/10276.1460569...@sss.pgh.pa.us regards, tom lane -- 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] [patch] \crosstabview documentation
Re: Tom Lane 2016-04-13 <1854.1460562...@sss.pgh.pa.us> > Hm, we do not have entries attached to any other psql > meta-commands. Maybe they all should have one, or maybe not, but > I'm unconvinced about adding one for just this command. What I did > instead was to make a link target (which there *is* precedent for, > see \copy) and have the note in tablefunc.sgml link to it. Hmm. I was looking at \? first and because the 1-liner there isn't even attempting to explain the \crosstabview syntax, went on to bookindex.html, but could only find the "wrong" crosstab there. \copy is the other example where I'd think a bookindex entry would make sense so people can look up the documentation, all the other \backslash things are much easier to grasp. Not sure if it's only me, but bookindex.html is where I have my browser bookmark to start diving into the documentation. > I failed to resist the temptation to edit the command description > rather heavily, too. > > Pushed with revisions. Thanks! Another thing about \crosstabview: # select 1,2 \crosstabview The query must return at least two columns to be shown in crosstab s/two/three/, I guess. Christoph -- 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] [patch] \crosstabview documentation
Christoph Berg writes: >> Here's a small doc patch that removes the bogus space in "colH [:scolH]" >> (otherwise psql complains that it is ignoring the 4th parameter. >> It also adds an index entry and adds a note to the old crosstab >> functions to make people aware of \crosstabview. > I should save before diffing, here's the version I actually wanted to > submit ... Hm, we do not have entries attached to any other psql meta-commands. Maybe they all should have one, or maybe not, but I'm unconvinced about adding one for just this command. What I did instead was to make a link target (which there *is* precedent for, see \copy) and have the note in tablefunc.sgml link to it. I failed to resist the temptation to edit the command description rather heavily, too. Pushed with revisions. regards, tom lane -- 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] [patch] \crosstabview documentation
Re: To PostgreSQL Hackers 2016-04-13 <20160413092312.ga21...@msg.df7cb.de> > Re: Alvaro Herrera 2016-04-09 <20160408232553.GA721890@alvherre.pgsql> > > It's useful, no doubt. > > It's cool :) > > > I pushed it. > > Here's a small doc patch that removes the bogus space in "colH [:scolH]" > (otherwise psql complains that it is ignoring the 4th parameter. > > It also adds an index entry and adds a note to the old crosstab > functions to make people aware of \crosstabview. I should save before diffing, here's the version I actually wanted to submit ... Christoph diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml new file mode 100644 index 1f07956..e6b5a7e *** a/doc/src/sgml/ref/psql-ref.sgml --- b/doc/src/sgml/ref/psql-ref.sgml *** testdb=> *** 990,999 \crosstabview [ colV ! colH ! [:scolH] [colD] ] --- 990,1002 + + crosstabview + + \crosstabview [ colV ! colH[:scolH] [colD] ] diff --git a/doc/src/sgml/tablefunc.sgml b/doc/src/sgml/tablefunc.sgml new file mode 100644 index 1d8423d..53b2a89 *** a/doc/src/sgml/tablefunc.sgml --- b/doc/src/sgml/tablefunc.sgml *** row2val21 val22 val23 ... *** 192,197 --- 192,204 calling query). + + +The \crosstabview psql command provides similar +functionality that is easier to use (albeit not on the SQL level). + + + For example, the provided query might produce a set something like: -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers