David Fetter wrote:
That said, a thing in psql that could slice serialized output into
columns would be handy as a broad, general part of reporting in
psql
To avoid any confusion with server-side PIVOT, I suggest that the
currently proposed command in psql should have a different name
On Tue, Aug 11, 2015 at 10:13:48AM -0400, Robert Haas wrote:
On Sun, Aug 9, 2015 at 8:18 PM, Tom Lane t...@sss.pgh.pa.us wrote:
psql is a minority API, you know.
Not for me. psql has already got a bunch of bells and whistles to
format things in particular ways that people have wanted, and
David Fetter wrote:
That depends on what you mean by dynamic columns. The approach
taken in the tablefunc extension is to use functions which return
SETOF RECORD, which in turn need to be cast at runtime.
For me, PIVOT with dynamic columns would be a pivot query
whose output columns
On Sun, Aug 9, 2015 at 8:18 PM, Tom Lane t...@sss.pgh.pa.us wrote:
psql is a minority API, you know.
Not for me. psql has already got a bunch of bells and whistles to
format things in particular ways that people have wanted, and I'm not
really sure why the bar for this proposal should be any
On Tue, Aug 11, 2015 at 05:13:03PM +0200, Daniel Verite wrote:
David Fetter wrote:
That depends on what you mean by dynamic columns. The approach
taken in the tablefunc extension is to use functions which return
SETOF RECORD, which in turn need to be cast at runtime.
For me,
David Fetter wrote:
Second, if we put this feature as-is in psql, we're stuck supporting
it in psql until the end of time, even if (when, I believe) we have a
fuller and likely not perfectly compatible feature on the back-end.
To me, doing \pivot in psql vs PIVOT in the backend is a
Tom Lane wrote:
I'm not sure how pushing it out to psql makes that better. There is
no way to do further processing on something that psql has printed,
so you've punted on solving that issue just as much if not more.
It's the same spirit as \x : the only thing it achieves is better
David Fetter wrote:
I'm working up a proposal to add (UN)PIVOT support to the back-end.
I was under the impression that a server-side PIVOT *with dynamic
columns* was just unworkable as an SQL query, because it couldn't
be prepared if it existed.
I am wrong on that? I feel like you
On Mon, Aug 10, 2015 at 07:10:41PM +0200, Daniel Verite wrote:
David Fetter wrote:
I'm working up a proposal to add (UN)PIVOT support to the back-end.
I was under the impression that a server-side PIVOT *with dynamic
columns* was just unworkable as an SQL query, because it couldn't
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 08/10/2015 04:03 PM, David Fetter wrote:
I am wrong on that? I feel like you guys are all telling me that
\pivot should happen on the server, but the point that it would
not be realistic to begin with is not considered.
I think that starting
2015-08-10 6:04 GMT+02:00 David Fetter da...@fetter.org:
On Sun, Aug 09, 2015 at 07:29:40PM +0200, Daniel Verite wrote:
Hi,
I want to suggest a client-side \pivot command in psql, implemented
in the attached patch.
\pivot takes the current query in the buffer, execute it and
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 08/09/2015 10:37 AM, Tom Lane wrote:
I can see the value of a feature like this, but doing it in psql
sure seems like the wrong place. It would be unavailable to
anything except interactive use.
Is there a way to implement pivoting as a
Daniel Verite dan...@manitou-mail.org writes:
I want to suggest a client-side \pivot command in psql, implemented
in the attached patch.
\pivot takes the current query in the buffer, execute it and
display it pivoted by interpreting the result as:
column1 = row in pivoted output
column2 =
Hi,
I want to suggest a client-side \pivot command in psql, implemented
in the attached patch.
\pivot takes the current query in the buffer, execute it and
display it pivoted by interpreting the result as:
column1 = row in pivoted output
column2 = column in pivoted output
column3 = value at
Tom Lane wrote:
Is there a way to implement pivoting as a set-returning function?
Not with the same ease of use. We have crosstab functions
in contrib/tablefunc already, but the killer problem with PIVOT
is that truly dynamic columns are never reachable directly.
If we could do this:
Daniel Verite dan...@manitou-mail.org writes:
Tom Lane wrote:
Is there a way to implement pivoting as a set-returning function?
Not with the same ease of use. We have crosstab functions
in contrib/tablefunc already, but the killer problem with PIVOT
is that truly dynamic columns are never
On Sun, Aug 09, 2015 at 07:29:40PM +0200, Daniel Verite wrote:
Hi,
I want to suggest a client-side \pivot command in psql, implemented
in the attached patch.
\pivot takes the current query in the buffer, execute it and
display it pivoted by interpreting the result as:
column1 = row
17 matches
Mail list logo