Cross-Tab queries in postgres?

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Postgresql General <pgsql-general(at)postgresql(dot)org>
Subject: Cross-Tab queries in postgres?
Date: 2002-07-22 01:35:58
Message-ID: 20020722113558.A26162@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I know they're not supported and that they should be done in the
presentation end of the software. However, I have a case where I need to use
the result as the input to another query. So I'm reading the output, doing
the cross-tab and copying the result back into the database.

Anyway, it doesn't seem to hard to implement so I was wondering if any other
database systems actually implement it. Mostly I'm interested in what syntax
they use to indicate such a query. (I presume it's not in the standard or
it'd be there already).

For those who don't understand what I mean by cross-tab, it's the conversion
of:

A | b | 1
A | c | 2
B | a | 3
B | b | 4
C | c | 5

into:

Column headings: a, b, c
A | | 1 | 2
B | 3 | 4 |
C | | | 5
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> There are 10 kinds of people in the world, those that can do binary
> arithmetic and those that can't.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message krzysiek 2002-07-22 06:40:20 windows + postgresql + java? Is it possible?
Previous Message Joe Conway 2002-07-22 00:05:03 Re: Memory usage question