From derby-dev-return-32062-apmail-db-derby-dev-archive=db.apache.org@db.apache.org Thu Oct 19 00:12:13 2006 Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 80077 invoked from network); 19 Oct 2006 00:12:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 19 Oct 2006 00:12:12 -0000 Received: (qmail 97361 invoked by uid 500); 19 Oct 2006 00:12:09 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 97328 invoked by uid 500); 19 Oct 2006 00:12:09 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 97297 invoked by uid 99); 19 Oct 2006 00:12:09 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Oct 2006 17:12:09 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of mcintyre.a@gmail.com designates 64.233.166.178 as permitted sender) Received: from [64.233.166.178] (HELO py-out-1112.google.com) (64.233.166.178) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Oct 2006 17:12:08 -0700 Received: by py-out-1112.google.com with SMTP id d80so604779pyd for ; Wed, 18 Oct 2006 17:11:14 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=hzm3Ed723BSVo/vnAtL63lNxecFT89xRG+jjyT1E5CCLCpTUV8YG0RW244uDjLTcoAE/6xUqzBSsXkueocXNzO6kPmFyI0sGCdxYWAT8gyFXyrRVwoQaKzDg+jO+0w/NnaioJWtwoIgszcbeOx9p2Tx36CnHy9+1fHuduBrV+UA= Received: by 10.64.149.15 with SMTP id w15mr15483758qbd; Wed, 18 Oct 2006 17:11:13 -0700 (PDT) Received: by 10.64.180.10 with HTTP; Wed, 18 Oct 2006 17:11:13 -0700 (PDT) Message-ID: <54ac72d70610181711g19458c6n33e37b14b2bc3c6b@mail.gmail.com> Date: Wed, 18 Oct 2006 17:11:13 -0700 From: "Andrew McIntyre" To: derby-dev@db.apache.org Subject: Re: Show commands are not orthogonal In-Reply-To: <4536BB39.9000709@sun.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_143096_11102872.1161216673830" References: <4534D736.9040000@sun.com> <54ac72d70610171105g55fed170s50a73d5da084cd47@mail.gmail.com> <4536B9F9.4080505@sun.com> <4536BB39.9000709@sun.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_143096_11102872.1161216673830 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 10/18/06, =D8ystein Gr=F8vlen wrote: > =D8ystein Gr=F8vlen wrote: > > > I will file a bug report for the documentation tomorrow. The > > documentation should proabably also say that system tables are only > > displayed if a schema is specified. > > Thinking about this for another few minutes, this still means that the > show commands are not orthogonal since by default system procedures and > indexes on system tables are displayed, but not system tables. So I'll > ask again: What do people think about this. So, I went and looked at the code after this came up yesterday and I believe that the original implementor may have thought it confusing to issue show tables and get a list of all the system tables that weren't in the current schema, especially if upon first connecting you don't know what the current schema is. But, because the table type for the system tables is SYSTEM TABLE, if one issued the command 'show tables in sys' you would get nothing if you just ask for the table type of TABLES. This led the original implementor to only request SYSTEM TABLES if a schema was provided. But, that decision in the code means if you 'set schema sys' and then 'show tables' you get no output. That's bad behavior, in my opinion. > Should we fix this, and, if yes, in what way? I've attached a patch which changes the behavior to adjust the behavior of show tables to what you describe, and which also fixes the problem I just found described above. Try it out, and if you're satisfied with the behavior, I'll open a JIRA for tracking for release purposes and then commit to trunk and 10.2. andrew ------=_Part_143096_11102872.1161216673830 Content-Type: application/octet-stream; name="ij_showalltables.diff" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="ij_showalltables.diff" X-Attachment-Id: f_etge9fyj SW5kZXg6IGphdmEvdG9vbHMvb3JnL2FwYWNoZS9kZXJieS9pbXBsL3Rvb2xzL2lqL2lqLmpqDQo9 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09DQotLS0gamF2YS90b29scy9vcmcvYXBhY2hlL2RlcmJ5L2ltcGwvdG9vbHMvaWov aWouamoJKHJldmlzaW9uIDQ2NTQxNykNCisrKyBqYXZhL3Rvb2xzL29yZy9hcGFjaGUvZGVyYnkv aW1wbC90b29scy9pai9pai5qagkod29ya2luZyBjb3B5KQ0KQEAgLTE2NDgsMTIgKzE2NDgsNyBA QA0KIAkJWyA8SU4+IHNjaGVtYT1pZGVudGlmaWVyKCkgXQogCXsKIAkJaWYodCE9bnVsbCkgewot CQkJLy8gT25seSBzaG93IG5vbi1zeXN0ZW0gdGFibGVzIGJ5IGRlZmF1bHQuCi0JCQkvLyBJZiBz Y2hlbWEgc3BlY2lmaWVkIChpLmUuIFNZUyksIGFsc28gZGlzcGxheSBzeXN0ZW0gdGFibGVzLgot CQkJaWYoc2NoZW1hIT1udWxsKQotCQkJCXR5cGVzID0gbmV3IFN0cmluZ1tdIHsgIlRBQkxFIiwg IlNZU1RFTSBUQUJMRSIgfTsKLQkJCWVsc2UKLQkJCQl0eXBlcyA9IG5ldyBTdHJpbmdbXSB7ICJU QUJMRSIgfTsKKwkJICAgIHR5cGVzID0gbmV3IFN0cmluZ1tdIHsgIlRBQkxFIiwgIlNZU1RFTSBU QUJMRSIgfTsKIAkJfQogCQllbHNlIGlmKHYhPW51bGwpCiAJCQl0eXBlcyA9IG5ldyBTdHJpbmdb XSB7ICJWSUVXIiB9Owo= ------=_Part_143096_11102872.1161216673830--