2 Replies Latest reply: Nov 6, 2012 12:02 AM by dz_r RSS

    2 bugs in "Edit table"?

    dz_r
      (SQL Developer version 3.2.20.09)

      Test table is created as follows:

      create table test1
      (
      id number,
      column1 varchar2(10 char),
      column2 varchar2(10 char)
      );

      create unique index test1_pk_i on test1(id);

      alter table test1 add constraint test1_pk primary key(id) using index test1_pk_i;


      (Bug #1)
      - In the tree navigator right-click on table "test1" and select "Edit" from popup menu - "Edit table" window appears.
      - Click on "Indexes" (in the tree in left panel)
      - Next click on "DDL" (or something else) in the tree in left panel - error message appears "Index TEST1_PK_I is defined identically to constraint TEST1_PK"
      What is wrong? Of course index TEST1 PK I is defined identically to constraint TEST1_PK, but it is not an error.

      (Bug #2)
      - In the tree navigator right-click on table "test1" and select "Edit" from popup menu - "Edit table" window appears.
      - In left panel in tree select "Columns" (it is selected by default)
      - Add comment to column "ID" - for example "Test comment"
      - In left panel in tree select "DDL" - now I see two times the same SQL command as follows:

      COMMENT ON COLUMN TEST1.ID IS 'Test comment';

      COMMENT ON COLUMN TEST1.ID IS 'Test comment';

      Edited by: dz_r on 2012-11-05 04:13
        • 1. Re: 2 bugs in "Edit table"?
          Gary Graham-Oracle
          Hi,

          If you click on the Help button in the Table editor, under Indexes pane you will see the following caveat:
          (Note, however, that this display does not include any indexes related to primary key and unique key constraints.) 
          Creating both an index and primary key constraint on the same column with different names seems to lead to the conditions you mention. If you create just the primary key constraint, or rename the index to match the primary key constraint, no index will appear in the editor per the help caveat noted above.

          Here is a prior forum discussion along the same lines:
          Re: 3.1EA2 index edit display bug

          Regards,
          Gary
          SQL Developer Team
          • 2. Re: 2 bugs in "Edit table"?
            dz_r
            +"If you create just the primary key constraint, or rename the index to match the primary key constraint, no index will appear in the editor per the help caveat noted above."+

            It is some kind of solution - but for newly created tables only. And it means that I must obey naming rules which SQL Developer ("Edit table" wizard) likes...

            But what about hundreds of tables that exists already with different index name and PK constraint name? Renaming PK indexes in all of them sounds not good.
            But without doing this they will be not editable in "Edit table" (as soon as I click on "Indexes" page)

            Edited by: dz_r on 2012-11-05 22:00