From: | Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> |
---|---|
To: | Ken Tanzer <ken(dot)tanzer(at)gmail(dot)com> |
Cc: | David Johnston <polobo(at)yahoo(dot)com>, PG-General Mailing List <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Question(s) about crosstab |
Date: | 2013-12-18 05:53:16 |
Message-ID: | CAOR=d=3GxAAR=-2R4gGF1fFiyN8jKMn-F3GrN8_K-7GyVL8pNQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, Dec 17, 2013 at 10:42 PM, Ken Tanzer <ken(dot)tanzer(at)gmail(dot)com> wrote:
>
> On Tue, Dec 17, 2013 at 5:11 PM, David Johnston <polobo(at)yahoo(dot)com> wrote:
>>
>> 3) Limitation of SQL - explained below:
>>
>> The function call string that you pass in is just that, a string, the SQL
>> construct within which it resides has no knowledge of its contents.
>>
>> SQL has the hard requirement that at the time you submit a query all columns
>> must be known. If a function is polymorphic (in the sense it can output
>> different columns/row-types) then when you call that function you must
>> indicate which columns (and types) are going to be output by the function
>> during this specific execution.
>
>
> I guess crosstabs were not all that I hoped they were (basically pivot tables), but thanks for the clear explanation.
In the past I've written simple bash, perl, php etc scripts that
interrogated catalogs and then built my crosstab queries for me. You
could do it in a pl language, tho probably not easily in plpgsql.
plpython or plperl etc would proabably be a good place to start.
From | Date | Subject | |
---|---|---|---|
Next Message | Albe Laurenz | 2013-12-18 08:24:20 | Re: help replacing expresion in plpgsql |
Previous Message | Ken Tanzer | 2013-12-18 05:42:28 | Re: Question(s) about crosstab |