Re: Question(s) about crosstab - Mailing list pgsql-general

From Ken Tanzer
Subject Re: Question(s) about crosstab
Date
Msg-id CAD3a31Uu0v+Z_SzHhp08xjGSTy5uuemkCJR0cfgoNMoz0VO22g@mail.gmail.com
Whole thread Raw
In response to Re: Question(s) about crosstab  (David Johnston <polobo@yahoo.com>)
Responses Re: Question(s) about crosstab  (Scott Marlowe <scott.marlowe@gmail.com>)
List pgsql-general
On Tue, Dec 17, 2013 at 5:11 PM, David Johnston <polobo@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.  

Cheers,
Ken

--
AGENCY Software  
A data system that puts you in control
100% Free Software
(253) 245-3801

learn more about AGENCY or
follow the discussion.

pgsql-general by date:

Previous
From: David Johnston
Date:
Subject: Re: Question(s) about crosstab
Next
From: Scott Marlowe
Date:
Subject: Re: Question(s) about crosstab