Menu

Problems with DEFAULT-Values in Packages

hcdb
2004-09-10
2004-09-14
  • hcdb

    hcdb - 2004-09-10

    PLDoc-parser has problems, if input-parameter(s) of functions or procedures in packages do have a DEFAULT-value defined.

    example:
    FUNCTION Test
    ( I_ID IN NUMBER
    , I_Name IN VARCHAR2
    , I_CDate IN DATE DEFAULT SYSDATE
    )
      RETURN  VARCHAR2;

     
    • Albert Tumanov

      Albert Tumanov - 2004-09-11

      I do not have any problems with that example (pldoc  0.8.2):

      create or replace package xxx as

      FUNCTION Test
      ( I_ID IN NUMBER
      , I_Name IN VARCHAR2
      , I_CDate IN DATE DEFAULT SYSDATE
      )
        RETURN  VARCHAR2;

      end;

       
    • hcdb

      hcdb - 2004-09-14

      Sorry for that massage, we had a typo.
      ...DEFAULT(2)

      By writing '...DEFAULT 2' or '...DEFAULT '2' ' everything is ok.

      The only amazing thing is, that our package was valid. In Oracle-docu I haven't found any entry for that syntax.

      Sorry again, and thanks a lot for your answer

       
      • Barry J.

        Barry J. - 2004-09-14

        Since the DEFAULT can be an expression, parentheses are legitimately possible.  But for the writer of PLDoc, trying to recreate a 100% compliant SQL *and* PL/SQL parser is expecting a lot.

         
      • Albert Tumanov

        Albert Tumanov - 2004-09-14

        There was a little nasty error that caused this problem.
        Registered bug 1028068.

        Fixed in CVS.
        When the next nightly release will be created, the fix will be there.

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.