Re: pg_tablespace_location() error message

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_tablespace_location() error message
Date: 2012-04-10 22:08:34
Message-ID: 20120410220834.GG3379@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Apr 10, 2012 at 05:43:12PM -0400, Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > The new pg_tablespace_location() function added in PG 9.2 to remove the
> > director location from pg_tablespace returns an odd error for '0', which
> > is InvalidOID:
>
> Well, it's the same "odd error" you'd get for any other bogus OID.
>
> The way the function is coded, it has no need to look into pg_tablespace
> as such, which is why you don't get something like "no such tablespace".
> We could add such a lookup purely for error detection purposes, but I'm
> not real sure I see the point.
>
> > Is this OK? It handles NULL just fine:
>
> That's a consequence of the function being marked strict; it has nothing
> much to do with anything.

OK, just checking before this function gets into a release.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2012-04-10 22:16:31 Re: pg_tablespace_location() error message
Previous Message Greg Smith 2012-04-10 22:07:19 Re: Patch: add timing of buffer I/O requests