Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-2019

IJ's describe command does not handle quotes very well

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 10.2.1.6, 10.3.1.4
    • 10.3.1.4
    • Tools
    • None
    • Normal

    Description

      In IJ, the describe <table | view> command does not handle quotes very well. Current behavior is:

      a) Double quotes:

      IJ does not recognize describe command when encountering double quotes.

      ij> create table "CamelCaseTable" (col1_in_cct int);
      0 rows inserted/updated/deleted
      ij> describe "CamelCaseTable";
      ERROR 42X01: Syntax error: Encountered "describe" at line 1, column 1.

      I'm assuming that it should be possible to execute the describe command on case-sensitive table names.

      b) Single quotes:

      IJ describes all tables in current schema when encountering two single quotes after the describe command.

      ij> create table table1 (col1_table1 int);
      0 rows inserted/updated/deleted
      ij> create table table2 (col1_table2 int);
      0 rows inserted/updated/deleted
      ij> describe '';
      COLUMN_NAME |TYPE_NAME|DEC&|NUM&|COLUM&|COLUMN_DEF|CHAR_OCTE&|IS_NULL&
      ------------------------------------------------------------------------------
      COL1_TABLE1 |INTEGER |0 |10 |10 |NULL |NULL |YES
      COL1_TABLE2 |INTEGER |0 |10 |10 |NULL |NULL |YES

      2 rows selected

      In case b), it does not make a difference whether the single quotes actually surround a valid table name, some garbage, or nothing at all.

      I must admit that b) seems like a useful feature, listing all columns in all tables in a schema, but it's usage is not very intuitive, nor is it documented, so this may be a bug.

      Attachments

        1. describe_enhancement.diff
          7 kB
          Bryan Pendleton
        2. rtoolsijcomrefdescribe.html
          11 kB
          Bryan Pendleton
        3. docs.diff
          2 kB
          Bryan Pendleton

        Issue Links

          Activity

            People

              bryanpendleton Bryan Pendleton
              johnemb John Embretsen
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: