Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 08706B5D8C5 for ; Tue, 9 Aug 2011 03:39:46 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 72172-07 for ; Tue, 9 Aug 2011 06:39:40 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172]) by mail.postgresql.org (Postfix) with ESMTP id E1F45B5D800 for ; Tue, 9 Aug 2011 03:39:39 -0300 (ADT) Received: by iye7 with SMTP id 7so10825082iye.17 for ; Mon, 08 Aug 2011 23:39:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=FYLFedYF+fIsKK3D0FKpQ7wMye5TZNmsiSGlFEe3KxY=; b=Lv0okCvhcPqAtkhHJEMSYapxwAIJRth+2dKmOQw4xBAnu3lJTuDLHwkHRq66ht/pVh GIguAAdPxrPbP1ki20Xai9c1DkVxWbMZcgwQBKdyMIOzdLgJvDNYlV/J3aYZ/rCurl5R DNCTBe0ZBxMjVtueTH/P3/vjymGudbQcWKmeg= Received: by 10.42.96.194 with SMTP id k2mr5949991icn.6.1312871979379; Mon, 08 Aug 2011 23:39:39 -0700 (PDT) Received: from [192.168.1.189] ([61.199.203.168]) by mx.google.com with ESMTPS id y14sm895471ibf.45.2011.08.08.23.39.36 (version=SSLv3 cipher=OTHER); Mon, 08 Aug 2011 23:39:38 -0700 (PDT) Message-ID: <4E40D686.1090609@gmail.com> Date: Tue, 09 Aug 2011 15:41:10 +0900 From: Shigeru Hanada User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: Josh Kupershmidt CC: Robert Haas , pgsql-hackers Subject: Re: psql: display of object comments References: In-Reply-To: Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.899 tagged_above=-5 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001 X-Spam-Level: X-Archive-Number: 201108/396 X-Sequence-Number: 193151 (2011/08/09 7:01), Josh Kupershmidt wrote: >> I am a bit confused as to why we have both \det and \dE. They seem >> redundant. Shouldn't we rip one of those out? IMHO, \det should be >> the one to go, as it could be useful to do, e.g. \dtvE, which isn't >> going to work with the \det syntax. > > Yeah, I was wondering that myself. At first I thought maybe someone > added in one without being aware of the other, but it looks like both > \dE and \det got added in by commit > 0d692a0dc9f0e532c67c577187fe5d7d323cb95b. They are using different > queries internally (pg_class vs. pg_foreign_table), but I doubt end > users would care about that. Or perhaps the author just wanted a > command name similar to \dew and \des. I'm the author of that patch, sorry for confusion. May I explain the background of implementing those command? :) Basically, during implementing foreign table support, I tried to follow the existing design. I found two backslash command groups in psql, \de[wsu] and \d[tvsT], which are relevant to foreign table. Former is a group for listing relation (table, view, sequence and type), and they have common output format. Users would use them (sometimes with combination like \dtv) to list only specified type of relations. OTOH latter is a group for listing SQL/MED objects (wrapper, server and user mapping), and commands in that group have different output columns. Users would use them to see detail of FDW options, maybe mainly FDW options. They had been implemented in different ways then, and I kept implementation similar to existing codes for each. But now, as you say, they seem redundant and inconsistent each other. > +1 for getting rid of one of them; I don't really care which one gets > the axe. Though we should make sure to be able to show all possible > columns in whichever command we keep (i.e. add "Options" column to > \dE+ if we keep that one). I'm not sure whether getting rid of one of them is better. But maybe \dE is useless than \det, because former doesn't shows more information than simple \d. > BTW, I haven't bothered setting up > functioning foreign tables yet, but is "Size" always going to be 0 > bytes in \dE+? Yes, "Size" is total file size calculated with pg_table_size(), but foreign table has no data file. Regards, -- Shigeru Hanada