Re: pg_tablespace_location() error message

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_tablespace_location() error message
Дата
Msg-id 428.1334102250@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pg_tablespace_location() error message  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: pg_tablespace_location() error message  (Bruce Momjian <bruce@momjian.us>)
Re: pg_tablespace_location() error message  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Bruce Momjian <bruce@momjian.us> writes:
> On Tue, Apr 10, 2012 at 07:09:33PM -0400, Tom Lane wrote:
>> 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?

> I have no idea.  The big problem is that we currently use '' for the
> cluster default, while 0 means the database default.  I can't think of a
> good return result --- I think it has to be an error of some kind.

If we expect this function to mainly be applied to pg_class.reltablespace,
then it seems like it ought to understand that zero means "the database
default" and substitute the database's default tablespace.  That might
or might not be the same as the cluster default.

Alternatively, we could expect pg_upgrade to understand that and make
the substitution itself, but if the same would be needed by most uses of
the function, maybe we should just do it here.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Patch: add timing of buffer I/O requests
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: Patch: add timing of buffer I/O requests