Skip to Main Content

SQL & PL/SQL

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!

Cannot insert PK-based REFs or index sys-generated REF columns

sperkmandlMay 14 2009 — edited May 14 2009
Hi, after playing around successfully with REFs for some time, I came up with a deadlock between two patterns:

1. if I define an object table through OBJECT IDENTIFIER IS PRIMARY KEY, then I can use its REFs in other tables - provided that I define FOREIGN KEY or SCOPE IS constraints on involved columns.
But I need to insert such REFs in a column without constraints, since they may come from multiple tables of the same type. Then I get "ORA-22979 cannot INSERT object view REF or user-defined REF". I guess that by "user-defined REF" it means PK-based REFs, as opposite to system generated.

or

2. I can define the object table through OBJECT IDENTIFIER IS SYSTEM GENERATED OIDINDEX, but then I cannot index any column defined in other tables through REFs to the above table: I get "ORA-02332 cannot create index on attributes of this column", while inserting such REFs into any unconstrained column succeeds.

Manual says the indexing on a REF column is allowed if scoping has been defined on that column - it doesn't say anything about how the REF table has been defined.
Is there anything I miss ? Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 11 2009
Added on May 14 2009
1 comment
385 views