pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thom Brown <thom@linux.com>
Cc: pgsql-docs <pgsql-docs@postgresql.org>
Subject: Re: Remove name as valid parameter for catalog functions
Date: Mon, 07 Mar 2011 13:00:53 -0500
Message-ID: <8687.1299520853@sss.pgh.pa.us> (raw)
In-Reply-To: <AANLkTinZa6Gg5M=jT689bm5qA=40vMuEh60zE+5KmDb7@mail.gmail.com>
References: <AANLkTikyHfvSDYYmKT9xqLhHid_CrLSqWE519yPqkdbL@mail.gmail.com>
	<23947.1299511140@sss.pgh.pa.us>
	<AANLkTinZa6Gg5M=jT689bm5qA=40vMuEh60zE+5KmDb7@mail.gmail.com>

Thom Brown <thom@linux.com> writes:
> On 7 March 2011 20:49, Tom Lane <tgl@sss.pgh.pa.us> 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



view thread (7+ messages)  latest in thread

Message-ID: <8687.1299520853@sss.pgh.pa.us>
Permalink:  ../8687.1299520853@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/8687.1299520853@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, thom@linux.com
  Subject: Re: Remove name as valid parameter for catalog functions
  In-Reply-To: <8687.1299520853@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox