question

thecoop avatar image
thecoop asked

Table -> Function dependency via a virtual column not in all_dependencies?

I've got the following objects:

CREATE FUNCTION CONSTFUNC RETURN INT
DETERMINISTIC
AS
BEGIN
RETURN 1;
END;

CREATE TABLE "FUNCTABLE" (
  "ID" NUMBER(*,0) NOT NULL,
  "VIRT" NUMBER GENERATED ALWAYS AS ("CONSTFUNC"()) NULL
);

however, the functable => constfunc dependency is not listed in all_ or user_ dependencies. Is there anywhere I can access this dependency information in the dictionary?

dependencydata-dictionary
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
dmann avatar image
dmann answered

This is interesting. You might check my answer here which shows that there are some dependencies which are not available in the documentation.

I have found anomalies with virtual columns before when trying to reference them via sys.col_usage$ for the purpose of looking up statistics. I am thinking this might be another Oracle feature that was rushed in and not all implications were thought through.

Also keep in mind _DEPENDENCIES views are new, it sometimes takes a few versions for Oracle to work out the kinks. Considered opening an SR with Oracle on this one?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.