From 16d8e594acd96661267cb7897834f9cba51a2ffd Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Wed, 7 Dec 2011 10:35:00 +0100 Subject: Remove spclocation field from pg_tablespace Instead, add a function pg_tablespace_location(oid) used to return the same information, and do this by reading the symbolic link. Doing it this way makes it possible to relocate a tablespace when the database is down by simply changing the symbolic link. --- doc/src/sgml/catalogs.sgml | 7 ------- doc/src/sgml/func.sgml | 9 +++++++++ doc/src/sgml/xaggr.sgml | 4 ++-- 3 files changed, 11 insertions(+), 9 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml index 8156c35916a..b8cc16f72a9 100644 --- a/doc/src/sgml/catalogs.sgml +++ b/doc/src/sgml/catalogs.sgml @@ -5391,13 +5391,6 @@ Owner of the tablespace, usually the user who created it - - spclocation - text - - Location (directory path) of the tablespace - - spcacl aclitem[] diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index ddfb29a4338..e7f7fe0e889 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -13611,6 +13611,10 @@ SELECT pg_type_is_visible('myschema.widget'::regtype); pg_tablespace_databases + + pg_tablespace_location + + pg_typeof @@ -13758,6 +13762,11 @@ SELECT pg_type_is_visible('myschema.widget'::regtype); setof oid get the set of database OIDs that have objects in the tablespace + + pg_tablespace_location(tablespace_oid) + text + get the path in the filesystem that this tablespace is located in + pg_typeof(any) regtype diff --git a/doc/src/sgml/xaggr.sgml b/doc/src/sgml/xaggr.sgml index 811934bd75b..1822f6d4abd 100644 --- a/doc/src/sgml/xaggr.sgml +++ b/doc/src/sgml/xaggr.sgml @@ -154,7 +154,7 @@ SELECT attrelid::regclass, array_accum(attname) attrelid | array_accum ---------------+--------------------------------------- - pg_tablespace | {spcname,spcowner,spclocation,spcacl} + pg_tablespace | {spcname,spcowner,spcacl,spcoptions} (1 row) SELECT attrelid::regclass, array_accum(atttypid::regtype) @@ -164,7 +164,7 @@ SELECT attrelid::regclass, array_accum(atttypid::regtype) attrelid | array_accum ---------------+--------------------------- - pg_tablespace | {name,oid,text,aclitem[]} + pg_tablespace | {name,oid,aclitem[],text[]} (1 row) -- cgit v1.2.3