Table functions and AS clauses ...
| От | Hans-Jürgen Schönig |
|---|---|
| Тема | Table functions and AS clauses ... |
| Дата | |
| Msg-id | 3EEAF054.8070407@cybertec.at обсуждение исходный текст |
| Ответы |
Re: Table functions and AS clauses ...
|
| Список | pgsql-hackers |
Currently I am able to do ...
SELECT dblink_oraconnect('scott/tiger@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
В списке pgsql-hackers по дате отправления: