pg_tablespace.spclocation column is gone in PostgreSQL 9.2. It's been replaced by pg_tablespace_location(oid) function. Attached is a patch to fix a query used by pgAdmin accordingly.

(this started to get on my nerve, as the query is executed every time you connect to a database..)

--
  Heikki Linnakangas
  EnterpriseDB   http://www.enterprisedb.com
diff --git a/pgadmin/schema/pgTablespace.cpp b/pgadmin/schema/pgTablespace.cpp
index 37ed1ed..9ad6ecf 100644
--- a/pgadmin/schema/pgTablespace.cpp
+++ b/pgadmin/schema/pgTablespace.cpp
@@ -266,7 +266,7 @@ pgObject *pgTablespaceFactory::CreateObjects(pgCollection *collection, ctlTree *
 	pgSet *tablespaces;
 	if (collection->GetConnection()->BackendMinimumVersion(9, 2))
 		tablespaces = collection->GetServer()->ExecuteSet(
-		                  wxT("SELECT ts.oid, spcname, spclocation, spcoptions, ")
+		                  wxT("SELECT ts.oid, spcname, pg_tablespace_location(ts.oid) AS spclocation, spcoptions, ")
 		                  wxT("pg_get_userbyid(spcowner) as spcuser, spcacl, ")
 		                  wxT("pg_catalog.shobj_description(oid, 'pg_tablespace') AS description, ")
 		                  wxT("(SELECT array_agg(label) FROM pg_shseclabel sl1 WHERE sl1.objoid=ts.oid) AS labels, ")
-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers

Reply via email to