[cx-oracle-users] How to use user-defined data-types?
Brought to you by:
atuining
From: Fabio Z. <fa...@es...> - 2004-06-14 18:31:51
|
Hi, I would like to define some types on Oracle and use them. e.g. CREATE TYPE POINT AS OBJECT( X NUMBER, Y NUMBER); CREATE TYPE POLYGON AS VARRAY(1000) OF POINT; CREATE TABLE POLYGONS ( NAME LONG, POLY POLYGON); I can insert values using: insert into polygons values ('p1' , polygon(point(2,2),point(3,3))) ; But when I try to fetch them using: cursor.execute("SELECT name, poly FROM polygons ") I get the following error: Traceback (most recent call last): File "x:\sid15\source\sid\db\tests\test_oracle_conn.py", line 69, in testIt cursor.execute("SELECT name, poly FROM polygon ") NotSupportedError: Variable_TypeByOracleDataType: unhandled data type 108 Dows anyone know how can I make it work? []s Fabio |