CVS Commit by dpage: Don't try to access pg_tablespace with 7.4 or below
require($_SERVER['DOCUMENT_ROOT']."/includes/top_config.php");
?>
CVS Commit by dpage: Don't try to access pg_tablespace with 7.4 or below
Log Message:
-----------
Don't try to access pg_tablespace with 7.4 or below
[Hiroshi Saito]
Modified Files:
--------------
pgadmin3/src/schema:
pgUser.cpp (r1.34 -> r1.35)
Index: pgUser.cpp
===================================================================
RCS file: /projects/pgadmin3/src/schema/pgUser.cpp,v
retrieving revision 1.34
retrieving revision 1.35
diff -Lsrc/schema/pgUser.cpp -Lsrc/schema/pgUser.cpp -u -w -r1.34 -r1.35
--- src/schema/pgUser.cpp
+++ src/schema/pgUser.cpp
@@ -98,13 +98,19 @@
wxArrayString dblist;
- pgSet *set=GetConnection()->ExecuteSet(
+ pgSet *set;
+ if (GetConnection()->BackendMinimumVersion(7, 5))
+ set=GetConnection()->ExecuteSet(
wxT("SELECT 'd' as type, datname, datallowconn, datdba\n")
wxT(" FROM pg_database db\n")
wxT("UNION\n")
wxT("SELECT 'M', spcname, null, null\n")
wxT(" FROM pg_tablespace where spcowner=") + uid + wxT("\n")
wxT(" ORDER BY 1, 2"));
+ else
+ set=GetConnection()->ExecuteSet(
+ wxT("SELECT 'd' as type, datname, datallowconn, datdba\n")
+ wxT(" FROM pg_database db"));
if (set)
{
Home |
Main Index |
Thread Index