On Tue, Dec 17, 2013 at 10:42 PM, Ken Tanzer <ken.tan...@gmail.com> wrote:
>
> On Tue, Dec 17, 2013 at 5:11 PM, David Johnston <pol...@yahoo.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.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to