From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_tablespace_location() error message |
Date: | 2012-04-10 22:16:31 |
Message-ID: | CA+TgmobbBA72f_K5473351NGCTen=Ab52iM47uENrJ5a=WhnqA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Apr 10, 2012 at 5:43 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> 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.
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.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2012-04-10 22:19:40 | Re: invalid search_path complaints |
Previous Message | Bruce Momjian | 2012-04-10 22:08:34 | Re: pg_tablespace_location() error message |