Illustra setof question
Posted in 1997
Hi:
I am familiarizing myself with Illustra Datablade development,
and wrote some types, functions etc. One of the types I introduced
is GRAPH, the mathematical thing consisting of points and lines.
To construct a graph is easy, something like:
create table t1 (p POINT);
insert into t1 values('(1,2)');
insert into t1 values('(3,4)');
insert into t1 values('(5,6)');
create table t2 (e LINE);
insert into t2 values('(1,2,3,4)');
insert into t2 values('(1,2,5,6)');
create table t3 (g GRAPH);
insert into t3
values(Graph2((select p from t1),(select e from t2)));
Works like a charm. Now I also coocked up a function
that returns a set of points from a graph, i.e.:
* begin transaction;
+ select Point(g) from t3;
---------------
|Point |
---------------
|Point_1_1_0 |
---------------
one row selected
+ fetch Point_1_1_0 all;
---------------------
|POINT |
---------------------
|(5.000000,6.000000)|
|(3.000000,4.000000)|
|(1.000000,2.000000)|
---------------------
3 rows fetched
+ end transaction;
This is all swell, but now comes my question. What is the
easiest way to get all the points from several graphs and
stuff them in another table. Or in other words can I do
a select that does not return a cursor but just a column
of points. This must be a simple SQL question......
Cheers, Erwin
Erwin Kalvelagen
kalvelagen@fel.tno.nl