Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Why shouldn't we use VERTEX_SET_TYPE and VERTEX_TYPE?

User_1871Jun 13 2022 — edited Jun 13 2022

The docs say:
36.31 SDO_UTIL.GETVERTICES
Note: The VERTEX_SET_TYPE and VERTEX_TYPE types are intended for use by Oracle only. Do not use these types in column definitions or functions that you create.
Why shouldn't we use VERTEX_SET_TYPE and VERTEX_TYPE?
For example, are there any known issues if we use those types in queries like this?
Collapse vertex rows into nested table type (aggregated by ID)

WITH cte (id, x, y) as (
 SELECT 1, 100, 101 FROM DUAL UNION ALL
 SELECT 1, 200, 201 FROM DUAL UNION ALL
 SELECT 2, 300, 301 FROM DUAL UNION ALL
 SELECT 2, 400, 401 FROM DUAL UNION ALL
 SELECT 2, 500, 501 FROM DUAL UNION ALL
 SELECT 3, 600, 601 FROM DUAL UNION ALL
 SELECT 3, 700, 701 FROM DUAL UNION ALL
 SELECT 3, 800, 801 FROM DUAL UNION ALL
 SELECT 3, 900, 901 FROM DUAL
)
SELECT id,
    CAST(
     COLLECT(
      MDSYS.VERTEX_TYPE(x, y, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, id)
      ORDER BY x, y
     )
     AS MDSYS.VERTEX_SET_TYPE
    )
FROM  cte
GROUP BY id
Comments
Post Details
Added on Jun 13 2022
2 comments
233 views