Re: Returning a Cross Tab record set from a function

From: KÖPFERL Robert <robert(dot)koepferl(at)sonorys(dot)at>
To: "'Marc Wrubleski'" <mlwruble(at)math(dot)ucalgary(dot)ca>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Returning a Cross Tab record set from a function
Date: 2005-06-06 10:20:22
Message-ID: ED4E30DD9C43D5118DFB00508BBBA76EB16742@neptun.sonorys.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-sql

|-----Original Message-----
|From: Marc Wrubleski [mailto:mlwruble(at)math(dot)ucalgary(dot)ca]
|Sent: Mittwoch, 01. Juni 2005 16:15
|To: pgsql-sql(at)postgresql(dot)org
|Subject: [SQL] Returning a Cross Tab record set from a function
|
[...]
|
|It seems I can do this from any higher level language, but it drives me
|crazy that I can't perform this operation as a function inside of
|Postgres...

Yes, semms very like this can't be done in just sql but needs a higher level
lng.
Actually Postgres provides such higher languages. Try including PL/Python
PL/perl or PL/tk. Fom there you are able to query all the metadata of the
wanted tables so that a adequate SQL-string can be generated.

In case of sourcecode, you find theses languages in the contrib dir
|
|Thanks for any thoughts you might have...
|
|--
|Marc Wrubleski <mlwruble_at_math.ucalgary.ca>
|
|
|---------------------------(end of
|broadcast)---------------------------
|TIP 9: the planner will ignore your desire to choose an index
|scan if your
| joining column's datatypes do not match
|

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2005-06-06 15:25:07 Re: [COMMITTERS] pgsql: Fix NUMERIC modulus to properly truncate
Previous Message Tom Lane 2005-06-06 04:13:36 pgsql: Nab some low-hanging fruit: replace the planner's base_rel_list

Browse pgsql-sql by date

  From Date Subject
Next Message Richard Huxton 2005-06-06 10:48:16 Re: how to store more than 3 MB of character data in Postgres
Previous Message Vadivel Subramaniam 2005-06-06 10:17:16 how to store more than 3 MB of character data in Postgres Varchar field