* criteria @param schemaParrern - a schema name pattern; "" retrieves those
	 * without a schema - we ignore this parameter @param procedureNamePattern -
	 * a procedure name pattern @return ResultSet - each row is a procedure
	 * description @exception SQLException if a database access error occurs
	 */
	public java.sql.ResultSet getProcedures(String catalog,
		String schemaPattern, String procedureNamePattern) throws SQLException
	{
		String sql = "SELECT NULL AS PROCEDURE_CAT, n.nspname AS PROCEDURE_SCHEM, p.proname AS PROCEDURE_NAME, NULL, NULL, NULL, d.description AS REMARKS, "
				+ java.sql.DatabaseMetaData.procedureReturnsResult
				+ " AS PROCEDURE_TYPE "
				+ " FROM pg_catalog.pg_namespace n, pg_catalog.pg_proc p "
				+ " LEFT JOIN pg_catalog.pg_description d ON (p.oid=d.objoid) "
				+ " LEFT JOIN pg_catalog.pg_class c ON (d.classoid=c.oid AND c.relname='pg_proc') "
				+ " LEFT JOIN pg_catalog.pg_namespace pn ON (c.relnamespace=pn.oid AND pn.nspname='pg_catalog') "
				+ " WHERE p.pronamespace=n.oid "
                + " AND " + resolveSchemaPatternCondition(
                                "n.nspname", schemaPattern);
		if(procedureNamePattern != null)
		{
			sql += " AND p.proname LIKE '"
				+ escapeQuotes(procedureNamePattern) + "' ";
		}
		sql += " ORDER BY PROCEDURE_SCHEM, PROCEDURE_NAME ";
		return createMetaDataStatement().executeQuery(sql);
	}