Re: BUG #15901: Tablespace showing as null in psql and pgadmin

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: BUG #15901: Tablespace showing as null in psql and pgadmin
Дата
Msg-id CAKFQuwZDv76EeY_WxPo3bYQDCe0Q0jGRkH_6FiF3nZCpHx9OhA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #15901: Tablespace showing as null in psql and pgadmin  (Ishan joshi <ishanjoshi@live.com>)
Ответы Re: BUG #15901: Tablespace showing as null in psql and pgadmin  (Ishan joshi <ishanjoshi@live.com>)
Список pgsql-bugs
On Tue, Jul 9, 2019 at 10:01 PM Ishan joshi <ishanjoshi@live.com> wrote:
Thanks for clarification but this should be part of functionality. It should show the non default tablespace if any. This is like tightly coupled as postgres do not want to user to use other than default tablespace.

PostgreSQL doesn't care one way or the other, and maybe it could have been done differently, but at this point it isn't worth changing.

In my application, tablespace is  requires to collect information for table. I have tried the other ways to extract it but I am failed to extract it.

As demonstrated elsewhere there is a relatively simple solution to the problem available (which you've only really vaguely defined as "information").  Yes, catalog queries can be difficult to put together but for the most part learning curve trumps spending significant developer time improving secondary functionality that can be made to work.
can you please help , How we can extract the details of User defined tablespace for the table created under it.

The system information function: pg_tablespace_location(tablespace_oid) provides the only piece of information not present on pg_tablespace - location.

Though if you need to know the location of the pg_default tablespace you will need to "show data_directory" (or the functional equivalent) since the two are the same by definition and "don't repeat yourself" is again in play (though this seems more likely amenable to change since its a user-oriented function and not a fundamental property of the system catalogs).

For the hierarchy (default) stuff as Thomas points out the StackOverflow posts covers the catalog query needed to query this model.

David J.

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

Предыдущее
От: Thomas Kellerer
Дата:
Сообщение: Re: BUG #15901: Tablespace showing as null in psql and pgadmin
Следующее
От: Ishan joshi
Дата:
Сообщение: Re: BUG #15901: Tablespace showing as null in psql and pgadmin