Re: [PATCH] Add size/acl information when listing databases

Поиск
Список
Период
Сортировка
От Andrew Gilligan
Тема Re: [PATCH] Add size/acl information when listing databases
Дата
Msg-id 2A6F34B3-0964-4DF5-8AF8-477673AA78FC@tcpd.net
обсуждение исходный текст
Ответ на Re: [PATCH] Add size/acl information when listing databases  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [PATCH] Add size/acl information when listing databases  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 20 Jan 2008, at 02:06, Tom Lane wrote:

> Andrew Gilligan <andy@tcpd.net> writes:
>> Attached is a rather small change to src/bin/psql/describe.c to
>> show database size and permissions when using the psql \l command.
>
> Doesn't this slow down \l by several orders of magnitude?  There's
> also the small problem that the query will fail entirely if there are
> any databases the current user cannot connect to.

I didn't run into the permissions issue while testing on 8.2.6, but
you're quite correct, after trying 8.3.x it fails entirely.  Sorry.

On databases containing around 50 tables it seems to return in under
10ms, but I haven't been able to test with larger than that.

> The ACL part is fine, the database size not so much.  I could see
> relegating the size to a \l+ option, but you still have to deal with  
> the
> permissions problem.

Showing the size on \l+ probably makes more sense, but I imagine that
would require a very different approach due to the permissions changes?

Best regards,
-Andy


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: message string fixes
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [PATCH] Add size/acl information when listing databases