From: | Ishan joshi <ishanjoshi(at)live(dot)com> |
---|---|
To: | "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
Subject: | Re: BUG #15901: Tablespace showing as null in psql and pgadmin |
Date: | 2019-07-10 06:02:43 |
Message-ID: | MN2PR10MB3725705042BC11174B278EE5A9F00@MN2PR10MB3725.namprd10.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Thanks David, Thomas for your response.
Thanks & Regards,[http://gfx2.hotmail.com/mail/w3/ltr/emoticons/computer.gif]
ISHAN JOSHI
________________________________
From: David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
Sent: Wednesday, July 10, 2019 11:09 AM
To: Ishan joshi
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15901: Tablespace showing as null in psql and pgadmin
On Tue, Jul 9, 2019 at 10:01 PM Ishan joshi <ishanjoshi(at)live(dot)com<mailto:ishanjoshi(at)live(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | Rares Salcudean | 2019-07-10 06:39:08 | Re: PG11 - Multiple Key Range Partition |
Previous Message | David G. Johnston | 2019-07-10 05:39:17 | Re: BUG #15901: Tablespace showing as null in psql and pgadmin |