From: KÖPFERL Robert <robert.koepferl@sonorys.at>
To: 'Marc Wrubleski' <mlwruble@math.ucalgary.ca>
To: pgsql-sql@postgresql.org
Subject: Re: Returning a Cross Tab record set from a function
Date: Mon, 6 Jun 2005 12:20:22 +0200
Message-ID: <ED4E30DD9C43D5118DFB00508BBBA76EB16742@neptun.sonorys.at> (raw)
|-----Original Message-----
|From: Marc Wrubleski [mailto:mlwruble@math.ucalgary.ca]
|Sent: Mittwoch, 01. Juni 2005 16:15
|To: pgsql-sql@postgresql.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
|
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: robert.koepferl@sonorys.at, mlwruble@math.ucalgary.ca
Subject: Re: Returning a Cross Tab record set from a function
In-Reply-To: <ED4E30DD9C43D5118DFB00508BBBA76EB16742@neptun.sonorys.at>
References: <ED4E30DD9C43D5118DFB00508BBBA76EB16742@neptun.sonorys.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox