This discussion is archived
10 Replies Latest reply: Nov 9, 2012 8:01 AM by rp0428 RSS

3.2.2 Members of package body not listed in the tree - Still not fixed!!!

xxsawer Explorer
Currently Being Moderated
Hi guys,

I see we have new version here, so let's have a look
CREATE OR REPLACE PACKAGE TEST_PACKAGE7 AS 

  PROCEDURE CURSOR;
  PROCEDURE TEST;

END TEST_PACKAGE7;
CREATE OR REPLACE PACKAGE BODY TEST_PACKAGE7 AS

PROCEDURE CURSOR IS
BEGIN
   NULL;
END;


PROCEDURE TEST IS
BEGIN
   NULL;
END;

END TEST_PACKAGE7;
Expand the the tree under package body :)
  • 2. Re: 3.2.2 Members of package body not listed in the tree - Still not fixed!!!
    Jim Smith Expert
    Currently Being Moderated
    Do you often use reserved words as procedure names?
  • 3. Re: 3.2.2 Members of package body not listed in the tree - Still not fixed!!!
    xxsawer Explorer
    Currently Being Moderated
    @Jim Smith
    Why are you asking? What are the limitations for objects names? This is the question you should ask while programing the parser.
    Let me answer your question differently. Do you know how I test in every new release whether this bug was fixed or not? I simply go through all of our packages in one of our project and stop when I find the bug. Then I make a simple test case for you to make your work easier. We have planty of projects and when checking this from past time until now, I didn't change the project yet.

    The only way how to fix the parser is to gather all possible namings and constructions and do the parser again.
  • 4. Re: 3.2.2 Members of package body not listed in the tree - Still not fixed!!!
    Gary Graham Expert
    Currently Being Moderated
    Dan & Jim,

    This is not my area, but most probably what we have here with the parser (AFAIK, parsers) is a trade-off:
    1. Bullet-proof parser = slower.
    2. Reasonably good parser = faster.

    Parsing is a mature technology but parsing performance may become an issue in a language with complex syntax, requiring optimizations with the potential for undesirable side-effects.

    -Gary
  • 5. Re: 3.2.2 Members of package body not listed in the tree - Still not fixed!!!
    rp0428 Guru
    Currently Being Moderated
    >
    Expand the the tree under package body
    >
    I can reproduce using 3.2.20.09 on Windows XP using JDK 1.6.0_22.

    + next to Packages - so I expand it
    + next to TEST_PACKAGE7 - so I expand it
    no + in the nav tree next to 'TEST_PACKAGE7 Body
    CURSOR
    TEST

    The two procedures and the body are listed beneath the initial tree entry.

    I cannot reproduce using 3.0.02 - tree expands normally

    - TEST_PACKAGE7
    - TEST_PACKAGE7 Body
    CURSOR
    TEST
    CURSOR
    TEST

    procedures are listed beneth the body and the initial tree entry representing the package itself.
  • 6. Re: 3.2.2 Members of package body not listed in the tree - Still not fixed!!!
    xxsawer Explorer
    Currently Being Moderated
    Hi Gary,
    thanks for looking into this. I can assure you this is not about the speed. We are talking about parsing of offline file which is probably already cached in memory. The parsing should take no time.
  • 7. Re: 3.2.2 Members of package body not listed in the tree - Still not fixed!!!
    Jim Smith Expert
    Currently Being Moderated
    xxsawer wrote:
    @Jim Smith
    Why are you asking?
    I am asking because I would rather the development team spent their time fixing serious bugs and developing new features than dealing with minor problems which are easily avoided.

    If you have genuine procedure names which cause this problem it would be better to provide the team with those rather than the silly and easily avoidable example above.

    The list of reserved words and keywords is available in the documentation - here, where there is also this text

    "Oracle SQL keywords are not reserved. However, Oracle uses them internally in specific ways. Therefore, if you use these words as names for objects and object parts, then your SQL statements may be more difficult to read and may lead to unpredictable results."

    YOu can also see the list in v$reserved_words
  • 8. Re: 3.2.2 Members of package body not listed in the tree - Still not fixed!!!
    xxsawer Explorer
    Currently Being Moderated
    You are so wrong you wouldn't believe.
    1) I personally am not using word "CURSOR" as procedure name. I am working in a team spreaded to different places and somebody else used it. I cannot simply change the procedure names because Developers parser can't handle it!
    2) Is this a valid procedure name? Yes
    Should the parser take into account all variants (like all other comercial products do)? Yes
    Is this particular case minor issue? Yes
    Are there any other issues with the parser? Yes, there are planty of them
    Do I have a list of cases what is not working? No, it's your job to test the parser and make it work. I am developing applications in PL/SQL mostly using SQL Developer, but not developing SQL Developer!!!
    Is this problem touching only the tree view? Of course not. I already reported non-functionality of Open declaration and replacement of local variables. I don't know if these features are using the same parser, but I am pretty sure they don't work because of parsing problems. I think I reported this multiple times, all these posts were ignored.

    Now to your post. Please don't interchange SQL keywords with PL/SQL keywords.
    I think you didn't find the point of the sentence you pasted:

    +Oracle SQL keywords are not reserved. However, Oracle uses them internally in specific ways. Therefore, if you use these words as names for objects and object parts, then your SQL statements may be more difficult to read and may lead to unpredictable results.+

    Nobody is using procedure called CURSOR in SQL statement.
    SELECT * FROM V$RESERVED_WORDS WHERE KEYWORD = 'CURSOR';
    
    KEYWORD     LENGTH     RESERVED     RES_TYPE     RES_ATTR     RES_SEMI     DUPLICATE
    CURSOR     6     N          N          N          N          N
  • 9. Re: 3.2.2 Members of package body not listed in the tree - Still not fixed!!!
    Jim Smith Expert
    Currently Being Moderated
    xxsawer wrote:
    You are so wrong you wouldn't believe.
    I'm not going to get into a slanging match with you. There are more considerations than your personal issues.,
    1) I personally am not using word "CURSOR" as procedure name. I am working in a team spreaded to different places and somebody else used it. I cannot simply change the procedure names because Developers parser can't handle it!
    Perhaps your organisation should develop some sensible development standards that don't use reserved words.
    2) Is this a valid procedure name? Yes
    No. See below.

    Should the parser take into account all variants (like all other comercial products do)? Yes
    Is this particular case minor issue? Yes
    Are there any other issues with the parser? Yes, there are planty of them
    Do I have a list of cases what is not working? No, it's your job to test the parser and make it work. I am developing applications in PL/SQL mostly using SQL Developer, but not developing SQL Developer!!!
    Not my job, I'm just another user. As I said above, my concern is that resources which would be better spent elsewhere are wasted on minor issues.
    Is this problem touching only the tree view? Of course not. I already reported non-functionality of Open declaration and replacement of local variables. I don't know if these features are using the same parser, but I am pretty sure they don't work because of parsing problems. I think I reported this multiple times, all these posts were ignored.
    Have you reported these on metalink? That is the official support channel. Problem reports on metalink are likely to be given more weight.

    >
    Now to your post. Please don't interchange SQL keywords with PL/SQL keywords.
    Cursor is also a reserved word in PL/SQL.
    I think you didn't find the point of the sentence you pasted:

    +Oracle SQL keywords are not reserved. However, Oracle uses them internally in specific ways. Therefore, if you use these words as names for objects and object parts, then your SQL statements may be more difficult to read and may lead to unpredictable results.+
    I would be interested in what you think it means. I think it means if you use keywords as object names you may get unpredictable results. You appear to be getting unpredictable results - the procedure compiles but doesn't parse properly in all cases. Cursor is also a reserved word in PL/SQL.

    Here is a quote from the PL/SQL Reference manual
    Reserved Words and Keywords

    Reserved words and keywords are identifiers that have special meaning in PL/SQL.

    You cannot use reserved words as ordinary user-defined identifiers. You can use them as quoted user-defined identifiers, but it is not recommended. For more information, see "Quoted User-Defined Identifiers".

    You can use keywords as ordinary user-defined identifiers, but it is not recommended.

    For lists of PL/SQL reserved words and keywords, see Table D-1 and Table D-2, respectively.
    The bug here seems to be that the compiler accepts CURSOR as a procedure name. That needs to be raised against the DBMS team I would have thought.
  • 10. Re: 3.2.2 Members of package body not listed in the tree - Still not fixed!!!
    rp0428 Guru
    Currently Being Moderated
    >
    1) I personally am not using word "CURSOR" as procedure name. I am working in a team spreaded to different places and somebody else used it. I cannot simply change the procedure names because Developers parser can't handle it!
    >
    Tested a modified version of your code. I CANNOT reproduce the problem using 3.2.20.09 on Windows XP using JDK 1.6.0_22.
    The only change made is to the procedure names.
    CREATE OR REPLACE PACKAGE TEST_PACKAGE8 AS 
      PROCEDURE ABC;
      PROCEDURE DEF;
    END TEST_PACKAGE8;
    
    
    CREATE OR REPLACE PACKAGE BODY TEST_PACKAGE8 AS
    PROCEDURE ABC IS
    BEGIN
       NULL;
    END;
    PROCEDURE DEF IS
    BEGIN
       NULL;
    END;
    END TEST_PACKAGE8;
    The above code displays in the tree properly just as version 3.0.02 does. The original code (see my original reply) still does not display properly.

    The ONLY difference is the procedure names. In both tests (yesterday and tody) the actual package was created using Toad. Sql Developer was ONLY used to see how the package displayed.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points