[Geoserver-devel] postgis datastore problems

I tracked down the problem in the postgis datastore to the
getTypeNames() functions:

if (namespace != null && !namespace.trim().equals("")) { //$NON-NLS-1$
  st = conn.prepareStatement(
    "SELECT distinct a.relname " //$NON-NLS-1$
    + "FROM pg_class a, pg_attribute b, pg_namespace c, pg_type d "
//$NON-NLS-1$
     + "WHERE a.oid = b.attrelid " //$NON-NLS-1$
     + "AND b.atttypid = d.oid " //$NON-NLS-1$
     + "AND a.relnamespace = c.oid " //$NON-NLS-1$
     + "AND c.nspname = ? " //$NON-NLS-1$
     + "AND d.typname = ? " //$NON-NLS-1$
     + "AND a.relname in (SELECT f_table_name FROM geometry_columns)"
//$NON-NLS-1$
  );
  st.setString(1, namespace);
  st.setString(2, "geometry"); //$NON-NLS-1$
}

This assumes that the pg_namespace table is properly setup; which, I'm
sure, most people will not have.

Jody said he backed this change out.

dave

----------------------------------------------------------
This mail sent through IMP: https://webmail.limegroup.com/