Re: pg_tablespace_location() error message - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_tablespace_location() error message
Date
Msg-id 28127.1334094192@sss.pgh.pa.us
Whole thread Raw
In response to pg_tablespace_location() error message  (Bruce Momjian <bruce@momjian.us>)
Responses Re: pg_tablespace_location() error message  (Bruce Momjian <bruce@momjian.us>)
Re: pg_tablespace_location() error message  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Bruce Momjian <bruce@momjian.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.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: invalid search_path complaints
Next
From: Greg Smith
Date:
Subject: Re: Patch: add timing of buffer I/O requests