Re: Remove name as valid parameter for catalog functions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Remove name as valid parameter for catalog functions
Дата
Msg-id 8687.1299520853@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Remove name as valid parameter for catalog functions  (Thom Brown <thom@linux.com>)
Ответы Re: Remove name as valid parameter for catalog functions  (Thom Brown <thom@linux.com>)
Список pgsql-docs
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

В списке pgsql-docs по дате отправления:

Предыдущее
От: Thom Brown
Дата:
Сообщение: Re: Column-level trigger doc typo fix
Следующее
От: Thom Brown
Дата:
Сообщение: Re: [HACKERS] Sync rep doc corrections