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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-general by date

  From Date Subject
Next Message Matthew Seaman 2010-09-30 12:11:30 Re: rotate psql output
Previous Message Ben Carbery 2010-09-30 11:46:14 Re: rotate psql output