Skip site navigation (1) Skip section navigation (2)

Re: rotate psql output

From: Vincenzo Romano <vincenzo(dot)romano(at)notorand(dot)it>
To: Ben Carbery <ben(dot)carbery(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: rotate psql output
Date: 2010-09-30 11:49:22
Message-ID: AANLkTinETCypBrfcT1U6kpEPnH7g8x9-6u_1RpxbWx4L@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-general
2010/9/30 Ben Carbery <ben(dot)carbery(at)gmail(dot)com>:
> On Thu, Sep 30, 2010 at 9:36 PM, Vincenzo Romano
> <vincenzo(dot)romano(at)notorand(dot)it> wrote:
>>
>> We also have the fantastic crosstab in tablefunc module (see chapter
>> F.36.1.4 for v9.0.0)
>>
> ..but these seem to be more pivot table functions that alter the data,
> rather than displaying it differently. Not sure if this method is adaptable
> but I may have a go.

Alter? crosstab doesn't alter anything if you don't ask to.

> To me swapping would be better suited as an option to psql. After all,
> calling columns 'columns' in sql is aribtrary - they could just as easily
> have been called rows or something else, so there's no reason for the output
> to be fixed that way. Although that would chew a lot of memory if you have a
> lot of records as you would need to read every record before formatting..and
> I guess that explains why it hasn't been done.
>
> No idea if this can be done in other clients!

Actually none, AFAIK.

-- 
Vincenzo Romano at NotOrAnd Information Technologies
Software Hardware Networking Training Support Security
--
NON QVIETIS MARIBVS NAVTA PERITVS

In response to

pgsql-general by date

Next:From: Matthew SeamanDate: 2010-09-30 12:11:30
Subject: Re: rotate psql output
Previous:From: Ben CarberyDate: 2010-09-30 11:46:14
Subject: Re: rotate psql output

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group