Toad World® Forums

12.9.0.48: Picklist dropdown not working in special case

Dropdown displays nothing in the following code:

CREATE OR REPLACE PACKAGE test_package AS END;

CREATE OR REPLACE PACKAGE BODY test_package AS
FUNCTION test2
RETURN dual.dummy%TYPE
IS
v_dummy dual.dummy%TYPE;
BEGIN
SELECT dummy INTO v_dummy FROM dual;
RETURN v_dummy;
END test2;

PROCEDURE test
AS
BEGIN
NULL;
dbms_utility.|
END;
END;
/

Fixed for next beta.

Thanks Michael!

Does that fix also work for this one?

DECLARE
v_dummy dual.dummy%TYPE;
BEGIN
SELECT dual.dummy
INTO v_dummy
FROM dual;

SELECT dual.| – not working here
INTO v_dummy
FROM dual;
END;

Michael, I think the second example is not working as expected yet (12.9.0.53).

The dropdown of the first query displays:
dual.*
dual.DUMMY

The second one only displays
DUMMY

Please check this example:

DECLARE
v_dummy dual.dummy%TYPE;
BEGIN
SELECT du|
INTO v_dummy
FROM dual;

SELECT du|
INTO v_dummy
FROM dual;
END;

I have found and reported several problems like this where the picklist seems to depend on some context that it should not. Is there some underlying problem that could be addressed? Thanks!

The anonymous block, select from dual example is fixed for next beta.

I went through your activity stream on Toad World and from what I can tell the only outstanding issue (other than CI’s inability to locate table refs in some SQL due to syntax errors) is this one for common table expressions. http://www.toadworld.com/products/toad-for-oracle/toad_for_oracle_beta_program/f/86/t/27672 This is logged.

What other context sensitive issues are you seeing? In general Code Insight should allow what is appropriate given the clause. Some restrictions have been recently lifted, but some are still in place. For example, if you invoke CI after “INSERT INTO |” it will limit shown objects to TABLE, VIEW, SCHEMA, and SYNONYM since other object types don’t make much sense there. If invoking after “INSERT INTO my_table (fld1, fld2, |)” then only columns are shown, etc.

Context sensitive issues can boil down to one of 2 causes… a) error in the logic that sets item visibility based on context or b) a bug that prevents CI from properly identifying the clause you’re working on or tables referenced in SQL. In case A the info is available, but hidden from you. These are easy fixes. In case B the info is not even available to show. The most likely cause is B and fixes here can be simple or more complicated depending on the source of the issue (Toad or parser).

If I’ve missed any of your reports please point me to them or post samples and I’ll investigate.

Thanks,

Michael

Sorry if my post was not clear, I have reported all issues and you are great at addressing them.

Writing simple code to reproduce the issues and reporting them takes me some time though, so I was hoping that maybe there was some conceptional problem that, when fixed, would also solve the issues that I have not discovered yet :slight_smile:

Here’s another one. It displays types, subtypes, exceptions and records, but no functions:

SELECT *
FROM dual
JOIN dual d ON ( d.dummy = dbms_utility.|

There really isn’t a conceptual level problem that can be addressed. Your code is parsed and the parser creates a massive XML document for it. Toad queries the XML document using XPath and I have a single XPath expression that must work for every statement of interest so it can be a little complicated. For these bugs the structure of the code changes little, if at all. Typically what the fix involves is a tweak to the XPath to cover some new scenario or to fix one broken during another fix. Sending test cases is the best bet. You can send the code you’re working with and I should be able to identify the problem even if I can’t execute it; I won’t need your table DDL for instance. If you’re able to send your actual code feel free to email offline if you don’t want to post it to the boards.

Michael

Ok, will do. Did you see this one in my last post?

SELECT *
FROM dual
JOIN dual d ON ( d.dummy = dbms_utility.|

Yes, it’s OK in latest beta. Public Synonyms option must be enabled in the Options for Code Insight.

Strange. I tried with the current beta, but it still only displays types, subtypes, exceptions and records, but no functions. Public Synonyms are enabled, I guess I would not get the list at all if it was disabled.