[Schmitzm-commits] r1737 - trunk/schmitzm-core/src/main/java/de/schmitzm/postgres

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Sep 29 18:14:51 CEST 2011


Author: alfonx
Date: 2011-09-29 18:14:47 +0200 (Thu, 29 Sep 2011)
New Revision: 1737

Modified:
   trunk/schmitzm-core/src/main/java/de/schmitzm/postgres/PGUtil.java
Log:
listIndexesForTable sollte jetzt PG 8.3 kompatibel sein...

Modified: trunk/schmitzm-core/src/main/java/de/schmitzm/postgres/PGUtil.java
===================================================================
--- trunk/schmitzm-core/src/main/java/de/schmitzm/postgres/PGUtil.java	2011-09-27 15:37:50 UTC (rev 1736)
+++ trunk/schmitzm-core/src/main/java/de/schmitzm/postgres/PGUtil.java	2011-09-29 16:14:47 UTC (rev 1737)
@@ -349,8 +349,9 @@
 			tableName = tableName.substring(tableName.indexOf(".") + 1, tableName.length());
 
 		List<String> idxes = new ArrayList<String>();
-
-		String sql = "select t.relname as table_name, i.relname as index_name, array_to_string(array_agg(a.attname), ', ') as column_names from pg_class t, pg_class i, pg_index ix, pg_attribute a where t.oid = ix.indrelid and i.oid = ix.indexrelid and a.attrelid = t.oid and a.attnum = ANY(ix.indkey) and t.relkind = 'r' and t.relname like '"
+		
+		//	, array_to_string(array_agg(a.attname), ', ') as column_names 
+		String sql = "select t.relname as table_name, i.relname as index_name from pg_class t, pg_class i, pg_index ix, pg_attribute a where t.oid = ix.indrelid and i.oid = ix.indexrelid and a.attrelid = t.oid and a.attnum = ANY(ix.indkey) and t.relkind = 'r' and t.relname like '"
 				+ tableName + "' group by t.relname, i.relname order by t.relname, i.relname";
 
 		ResultSet rs = s.executeQuery(sql);



More information about the Schmitzm-commits mailing list