sql="SELECT NULL AS PROCEDURE_CAT, NULL AS PROCEDURE_SCHEM, p.proname AS PROCEDURE_NAME, NULL, NULL, NULL, d.description AS REMARKS, "+java.sql.DatabaseMetaData.procedureReturnsResult+" AS PROCEDURE_TYPE "+
" FROM pg_proc p "+
" LEFT JOIN pg_description d ON (p.oid=d.objoid) "+
" LEFT JOIN pg_class c ON (d.classoid=c.oid AND c.relname='pg_proc') ";
if(procedureNamePattern!=null){
sql+=" WHERE p.proname LIKE '"+escapeQuotes(procedureNamePattern)+"' ";
}
sql+=" ORDER BY PROCEDURE_NAME ";
" LEFT JOIN pg_description d ON (p.oid=d.objoid) ";
if(connection.haveMinimumServerVersion("7.2")){
sql+=" LEFT JOIN pg_class c ON (d.classoid=c.oid AND c.relname='pg_proc') ";
}
if(procedureNamePattern!=null){
sql+=" WHERE p.proname LIKE '"+escapeQuotes(procedureNamePattern)+"' ";
}
sql+=" ORDER BY PROCEDURE_NAME ";
}else{
sql="SELECT NULL AS PROCEDURE_CAT, NULL AS PROCEDURE_SCHEM, p.proname AS PROCEDURE_NAME, NULL, NULL, NULL, NULL AS REMARKS, "+java.sql.DatabaseMetaData.procedureReturnsResult+" AS PROCEDURE_TYPE "+
" FROM pg_proc p ";
...
...
@@ -1995,9 +1997,6 @@ public abstract class AbstractJdbc1DatabaseMetaData