schemacrawler / SchemaCrawler

Free database schema discovery and comprehension tool
http://www.schemacrawler.com/
Other
1.62k stars 199 forks source link

oracle: Select from all_types should include owner #80

Closed pyrocks closed 8 years ago

pyrocks commented 8 years ago

Hi, refering to: (SELECT A.TYPECODE FROM ALL_TYPES A WHERE A.TYPE_NAME = ARG.DATA_TYPE)

You have to include the owner there as well (and A.owner=:owner or A.owner is null, if we assume one cannot override a reserved type name)

Here's an example of the same name returning 2 different type codes:

create type owner1.name1 as table of varchar2(10);
create type owner2.name1 as object(num1 number(1));

SELECT owner, typecode
FROM   ALL_TYPES A
where A.TYPE_NAME='NAME1'; 

OWNER;TYPECODE
=================
OWNER1;OBJECT
OWNER2;COLLECTION

Mor

schemacrawler commented 8 years ago

Please use SchemaCrawler 14.09.02.