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

From Joe Conway
Subject Re: Question(s) about crosstab
Date
Msg-id 52B2337C.6080609@joeconway.com
Whole thread Raw
In response to Re: Question(s) about crosstab  (John Abraham <jea@hbaspecto.com>)
List pgsql-general
On 12/18/2013 05:14 PM, John Abraham wrote:
> On Dec 18, 2013, at 3:52 PM, Joe Conway <mail@joeconway.com> wrote:
>> 3) Not possible -- reason was given down thread. Column definition
>> must be known/determinable by the parser prior to query execution.
>
> No, wait, I think you misunderstood my idea.  Can’t we have a python
> function that crosstabs the data in python, then creates a new table,
> then inserts that data into the new table by looping through a bunch
> of inserts?

Oh, well I believe you could do that today in plpgsql (build the "create
table as select * from crosstab..." sql as described earlier in this
thread, then execute it), so I'm sure you could do it in plpython as
well. But this isn't generally what people are looking for.

Joe

--
Joe Conway
credativ LLC: http://www.credativ.us
Linux, PostgreSQL, and general Open Source
Training, Service, Consulting, & 24x7 Support


pgsql-general by date:

Previous
From: Sergey Konoplev
Date:
Subject: Re: Replication failed after stalling
Next
From: wd
Date:
Subject: unexpected pageaddr error in db log