Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 26CF2133798E for ; Mon, 7 Mar 2011 14:01:06 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 89415-02 for ; Mon, 7 Mar 2011 18:00:55 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 0D0CD1337B58 for ; Mon, 7 Mar 2011 14:00:54 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p27I0reE008688; Mon, 7 Mar 2011 13:00:53 -0500 (EST) To: Thom Brown cc: pgsql-docs Subject: Re: Remove name as valid parameter for catalog functions In-reply-to: References: <23947.1299511140@sss.pgh.pa.us> Comments: In-reply-to Thom Brown message dated "Mon, 07 Mar 2011 23:06:12 +0530" Date: Mon, 07 Mar 2011 13:00:53 -0500 Message-ID: <8687.1299520853@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201103/18 X-Sequence-Number: 6451 Thom Brown writes: > On 7 March 2011 20:49, Tom Lane wrote: >> The reason those are phrased as "OID or name" is that what they take is >> regclass, which means that things like pg_total_relation_size('table_name') >> do in fact work. I think the proposed wording would leave people with >> the idea that they had to supply a numeric OID, which is a PITA and not >> by any means the expected usage. I agree that maybe the original >> wording could use some improvement, but I don't think that just removing >> "or name" is an improvement. > That's fair enough, but it still needs changing, as whilst an OID > won't cause an error, a field with the type of name will. Is it > reasonable to refer to a parameter as required to be of type regclass? Well, the table entries for those functions already show that the parameter is of type regclass. I think the purpose of the text descriptions is to help out people who might not immediately get the implications of that. Maybe we could say "the name or OID of a table", or some such phrase, so as to subtly avoid the expectation that what is being referred to is the datatype named "name"? regards, tom lane