Correct tablespace names are now shown in the list of tables.
Slightly more complex then you may expect because the tablespace specified by the tables tends to be oid 0 which means the default tablespace is used. However this does not mean pg_default, it means the tablespace as defined as standard in the database definition. So we need to know what the current dbname is retrieve it's details from the catalog and retrieve that tablespace to know what to show for an oid of 0.
This commit is contained in:
parent
7630723b69
commit
0cef509771
13 changed files with 128 additions and 10 deletions
24
pglablib/PgTablespaceContainer.h
Normal file
24
pglablib/PgTablespaceContainer.h
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#ifndef PGTABLESPACECONTAINER_H
|
||||
#define PGTABLESPACECONTAINER_H
|
||||
|
||||
#include "PgContainer.h"
|
||||
#include "PgTablespace.h"
|
||||
|
||||
namespace Pgsql {
|
||||
|
||||
class Result;
|
||||
|
||||
}
|
||||
|
||||
|
||||
class PgTablespaceContainer: public PgContainer<PgTablespace> {
|
||||
public:
|
||||
using PgContainer<PgTablespace>::PgContainer;
|
||||
|
||||
virtual std::string getLoadQuery() const override;
|
||||
protected:
|
||||
PgTablespace loadElem(const Pgsql::Row &row) override;
|
||||
private:
|
||||
};
|
||||
|
||||
#endif // PGTABLESPACECONTAINER_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue