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

From Tom Lane
Subject Re: pg_tablespace_location() error message
Date
Msg-id 29593.1334099373@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_tablespace_location() error message  (Bruce Momjian <bruce@momjian.us>)
Responses Re: pg_tablespace_location() error message  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
Bruce Momjian <bruce@momjian.us> writes:
> On Tue, Apr 10, 2012 at 06:16:31PM -0400, Robert Haas wrote:
>> On Tue, Apr 10, 2012 at 5:43 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> 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".

>> I think what Bruce might be getting at is that 0 is more likely than a
>> randomly chosen value to be passed to this function; for example, one
>> can imagine wanting to pass pg_class.reltablespace.

> Yes, that was my point.

Hm.  I have no objection to special-casing zero here, but what behavior
do you want?  Should it return an empty string as we do for
DEFAULTTABLESPACE_OID, or throw a different error?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Greg Smith
Date:
Subject: Re: Last gasp
Next
From: Tom Lane
Date:
Subject: Re: invalid search_path complaints