This discussion is archived
4 Replies Latest reply: Oct 31, 2012 12:33 PM by JoyceScapicchio RSS

Minor Diff Bug?

Postie Newbie
Currently Being Moderated
Hi Joyce

This is a minor bug...

I had a procedure in Source System... which was not in target system
CREATE OR REPLACE PROCEDURE paycalc_email_smtp (
   zdate      IN   DATE,
   MESSAGE    IN   VARCHAR2,
   msg_from   IN   VARCHAR2 := 'postie@mail.com',
   msg_to     IN   VARCHAR2 := 'postie@mail.com'
)
And I ran DIFF in SQL Dev, and it created the procedure in target system... but it created it with quotes
CREATE OR REPLACE PROCEDURE "PAYCALC_EMAIL_SMTP" (
   zdate      IN   DATE,
   MESSAGE    IN   VARCHAR2,
   msg_from   IN   VARCHAR2 := 'postie@mail.com',
   msg_to     IN   VARCHAR2 := 'postie@mail.com'
)
So when I run subsequent DIFF.. it finds the procedure names different.. when essentially they are not

Dean
  • 1. Re: Minor Diff Bug?
    JoyceScapicchio Journeyer
    Currently Being Moderated
    It is easy to get confused when dealing with mixed case names, and generally we recommend that all naming is done as uppercase. If you want to retain the case for an object in SQLDeveloper, you need to quote the name and in fact these two statements will create two different objects....

    CREATE OR REPLACE PROCEDURE "paycalc_email_smtp" ... Will create procedure paycalc_email_smtp which will show up in the tree in lower case
    CREATE OR REPLACE PROCEDURE paycalc_email_smtp ... Will create procedure PAYCALC_EMAIL_SMTP which will show up in the tree in upper case

    I suspect that you used the second form for creating the procedure which really created PAYCALC_EMAIL_SMTP.

    The export and diff always generates the names as quoted to retain the actual name that was saved for the object. So I think that the syntax you provided was what you typed in.
    CREATE OR REPLACE PROCEDURE paycalc_email_smtp (
    zdate IN DATE,
    MESSAGE IN VARCHAR2,
    msg_from IN VARCHAR2 := 'postie@mail.com',
    msg_to IN VARCHAR2 := 'postie@mail.com'
    );

    Which actually created the object as upper cased PAYCALC_EMAIL_SMTP.

    And diff or export would generate, correctly:
    CREATE OR REPLACE PROCEDURE "PAYCALC_EMAIL_SMTP" (
    zdate IN DATE,
    MESSAGE IN VARCHAR2,
    msg_from IN VARCHAR2 := 'postie@mail.com',
    msg_to IN VARCHAR2 := 'postie@mail.com'
    );
    /

    When I run this create:

    CREATE OR REPLACE PROCEDURE "paycalc_email_smtp" (
    zdate IN DATE,
    MESSAGE IN VARCHAR2,
    msg_from IN VARCHAR2 := 'postie@mail.com',
    msg_to IN VARCHAR2 := 'postie@mail.com'
    );

    Diff generates:

    CREATE OR REPLACE PROCEDURE "paycalc_email_smtp" (
    zdate IN DATE,
    MESSAGE IN VARCHAR2,
    msg_from IN VARCHAR2 := 'postie@mail.com',
    msg_to IN VARCHAR2 := 'postie@mail.com'
    );
    /

    Joyce Scapicchio
    SQLDeveloper Team

    Edited by: Joyce Scapicchio on Oct 26, 2012 7:58 AM
  • 2. Re: Minor Diff Bug?
    Postie Newbie
    Currently Being Moderated
    Hi Joyce

    Yes I am quite aware you can put quotes around to force case.. I avoid like the plague.. I hate quotes..

    I created on Source system as
    CREATE OR REPLACE PROCEDURE paycalc_email_smtp ...

    And yes created procedure PAYCALC_EMAIL_SMTP in tree.. but in the Dev window its paycalc_email_smtp
    And I completely expect it to think its PAYCALC_EMAIL_SMTP, as I have not explicitly used quotes.

    On Source System says
    create or replace PROCEDURE paycalc_email_smtp (

    On Target system says
    create or replace PROCEDURE "PAYCALC_EMAIL_SMTP" (

    Any When I use diff ... it says
    create or replace PROCEDURE "FDP"."PAYCALC_EMAIL_SMTP" (

    ?
  • 3. Re: Minor Diff Bug?
    rp0428 Guru
    Currently Being Moderated
    You've posted enough to know that you need to provide your full sql developer version. Without knowing your version no one can even try to reproduce any issue that you report.

    Also you seem to be developing a bad habit of not marking your questions ANSWERED when they have been.
    >
    Total Questions: 49 (42 unresolved)
    >
    Are all 42 of those still really unresolved? Most forum volunteers want to help people that have unresolved questions. When you don't mark questions ANSWERED when they have been it tends to waste people's time once they realize that the issue is closed.

    Please begin revisiting your 42 unresolved questions and marking them ANSWERED as appropriate.
  • 4. Re: Minor Diff Bug?
    JoyceScapicchio Journeyer
    Currently Being Moderated
    Hi Postie,
    I'm sorry, but I really don't understand what you are doing and would need more details in order to reproduce this problem. Please provide the versions of sqldeveloper and the databases that you are using. Also, provide the details of exactly what you are doing and what you are seeing.

    If you can provide a script to define the objects for the reproducible case, that is the best. Otherwise, provide a step-by-step, cook-book style descriiption of how you create the objects. Also include all the options you are using on the diff.

    Thanks,
    Joyce Scapicchio
    SQLDeveloper Team

Legend

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