Re: Server instrumentation patch - Mailing list pgsql-hackers

From Michael Paesold
Subject Re: Server instrumentation patch
Date
Msg-id 034601c578dd$3d95f330$0f01a8c0@zaphod
Whole thread Raw
In response to Re: Server instrumentation patch  ("Dave Page" <dpage@vale-housing.co.uk>)
List 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 by date:

Previous
From: "Michael Paesold"
Date:
Subject: Re: Server instrumentation patch
Next
From: Bruce Momjian
Date:
Subject: Re: Server instrumentation patch