[Geoserver-devel] [jira] Created: (GEOS-1430) Column using domain types are silently ignore in feature definitions

Column using domain types are silently ignore in feature definitions
--------------------------------------------------------------------

                 Key: GEOS-1430
                 URL: http://jira.codehaus.org/browse/GEOS-1430
             Project: GeoServer
          Issue Type: Bug
          Components: PostGIS
    Affects Versions: 1.4.1
         Environment: GeoServer 1.4.1
O.S.: Windows Server 2003 with SP1
Web Server: IIS
Servlet Container: Jetty
PostgreSQL/PostGIS 8.0.x database backend on Linux RHE 4.0
            Reporter: Steve Marshall
            Assignee: Andrea Aime
            Priority: Trivial

If a feature definition contains a column that is a defined as a domain type, the column is silently excluded from the feature definition. No error is issued, but the column is not available in the feature.

For reference, domain type are ordinary built-in types that are given a new name and associated with special checking logic, e.g. a TEXT type with a CHECK that the string matches a certain regular expression.

The workaround is to cast the column as its fundamental type in the feature definition. However, the need to do this should at least be documented.

The problem could be worked around by getting better type information from the database, e.g. from the udt_type column in the information_schema.columns view.

Example:
CREATE DOMAIN id_type AS TEXT CHECK (VALUE ~ '^[A-Z]{4}$');
create table public.test_id_type (id id_type, description text);
select addgeometrycolumn('public', 'test_id_type', 'the_geom', 4326, 'POINT', 2);

Create a Point feature in GeoServer using the test_id_type table. The "id" column will not be included in the feature.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira