From: | "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk> |
---|---|
To: | "Michael Paesold" <mpaesold(at)gmx(dot)at>, "Andreas Pflug" <pgadmin(at)pse-consulting(dot)de> |
Cc: | "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Server instrumentation patch |
Date: | 2005-06-24 16:10:15 |
Message-ID: | E7F85A1B5FF8D44C8A1AF6885BC9A0E490E70F@ratbert.vale-housing.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> -----Original Message-----
> From: Michael Paesold [mailto:mpaesold(at)gmx(dot)at]
> Sent: 24 June 2005 16:48
> To: Andreas Pflug
> Cc: Dave Page; PostgreSQL-development
> Subject: Re: [HACKERS] Server instrumentation patch
>
> Andreas Pflug wrote:
>
> >>For the second, please supply a patch that moves _all_ of
> dbsize into
> >>the main server. I think we have agreement on that.
> >>
> >
> > I don't think so. As I mentioned, those views are broken.
> Do you want them
> > to be in core anyway?
>
> Why is e.g. this one broken:
> int8 database_size(name) - Return the size of the database in
> bytes (by name)
>
> It should do the same as the one with the oid except that it
> will resolve
> the name first, no? If not it should be fixed, not dropped. I
> understand
> you'd like to have those functions for the GUI frontends, but
> what about
> psql users? For many people it will be hard work to type the
> subquery to get
> the database oid.
>
> I vote for all (possibly corrected) functions to be moved into core.
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'))
My main concern is that the names are inconsistent for no obvious
reason. 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.
Regards, Dave
From | Date | Subject | |
---|---|---|---|
Next Message | David Fetter | 2005-06-24 16:15:32 | Re: [PATCHES] Function's LEAST, GREATEST and DECODE (Oracle vararg polymorphic functions) |
Previous Message | Andreas Pflug | 2005-06-24 16:08:34 | Re: Server instrumentation patch |