Re: Server instrumentation patch

Поиск
Список
Период
Сортировка
От Michael Paesold
Тема Re: Server instrumentation patch
Дата
Msg-id 034601c578dd$3d95f330$0f01a8c0@zaphod
обсуждение исходный текст
Ответ на Re: Server instrumentation patch  ("Dave Page" <dpage@vale-housing.co.uk>)
Список pgsql-hackers
Dave Page wrote:

>
> You have pg_database_size(oid) and database_size(name). Afaict, the
> latter is equivalent to:
>
> SELECT pg_database_size((SELECT oid FROM pg_database WHERE datname =
> 'foo'))

The typing is even more e.g. for tables or indexes, though. Of course you 
can use the raw form, but why do we have pg_tables if there is pg_class 
anyway.

> My main concern is that the names are inconsistent for no obvious
> reason.

That could be fixed by having:
pg_database_size(name)
pg_database_size(oid)

The original idea was probably to name "internal" functions with pg_ and 
more user friendly ones without pg_. That does not mean it's a good idea.

> I also questioned whether or not the bloat of an additional
> function is worthwhile for what is probably a very small number of psql
> users that might use it (probably quite rarely), however if people say
> they would use it and that it's wothwhile, I wouldn't argue with it's
> inclusion.

Well, I don't feel this is really bloat. I have been using them since the 
creation of the contrib module and have found them quite useful.

Best Regards,
Michael Paesold 



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

Предыдущее
От: "Michael Paesold"
Дата:
Сообщение: Re: Server instrumentation patch
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Server instrumentation patch