From: | Hans-Jürgen Schönig <hs(at)cybertec(dot)at> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org, eg(at)cybertec(dot)at |
Subject: | Table functions and AS clauses ... |
Date: | 2003-06-14 09:52:20 |
Message-ID: | 3EEAF054.8070407@cybertec.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Currently I am able to do ...
SELECT dblink_oraconnect('scott/tiger(at)dbname');
SELECT * FROM dblink_ora('SELECT ename, sal FROM emp')
AS (ename text, sal text);
The problem is: If I wanted to do a
SELECT * FROM dblink_ora('SELECT * FROM emp');
It won't work because dblink_ora returns SETOF RECORD. If could define a
type representing the remote data structure.
However, my question is: Is there a way to implement it in a way that
does not depend on the remote data structure?
Is there a way to get rid of the AS without having to define a type?
Maybe somebody can provide me some information about that or point to me
to some material about this topic.
If we had a solution for that, we could go ahead and do some basic OLAP
operations. Imagine we had a cube generated by the means of SQL.
We could do
SELECT * FROM some_olap_operation(cube, ...);
without worrying about the elements in a certain dimension which should
be displayed in the x-axis (as columns).
If there was a nice workaround or a solution I'd be really happy :).
Regards,
Hans
--
Cybertec Geschwinde u Schoenig
Ludo-Hartmannplatz 1/14, A-1160 Vienna, Austria
Tel: +43/2952/30706; +43/664/233 90 75
www.cybertec.at, www.postgresql.at, kernel.cybertec.at
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2003-06-14 13:59:04 | Re: [HACKERS] PostgreSQL libraries - PThread Support, but |
Previous Message | Tom Lane | 2003-06-14 04:06:22 | Re: [HACKERS] SAP and MySQL ... [and Benchmark] |