Hi guys,
I have a postgis datastore in GeoServer 1.3.0-RC4.SP1.
Trying to send the following request:
<?xml version="1.0" encoding="iso-8859-1"?>
/Main/Source
/Main/Year
/Main/the_geom
1
40
12
56
/Main/Year
1988
GeoServer produces the following Exception:
org.geotools.data.DataSourceException: Error Performing SQL query: SELECT “ID”, “Source”, “Year” FROM “Main” WHERE ((ID = ‘234’) AND “the_geom” && GeometryFromText(‘POLYGON ((1 40, 1 56, 12 56, 12 40, 1 40))’, -1) AND “Year” = 1988)
…
…
…
Caused by: org.postgresql.util.PSQLException: ERROR: column “id” does not exist
Infact the SQL string is wrong, it should be:
… FROM “Main” WHERE ((“ID” = ‘234’) AND …
instead of
… FROM “Main” WHERE ((ID = ‘234’) AND …
Does anyone knows the cuse?
Thanks,
Alessio.
Hi Alessio,
I have tried to replicate your problem, with some sucess, however I am having a slightly different issue.
Would you be able to send me the exact definition of your table. The following pg_dump command should do it.
pg_dump -t "Main" --schema-only [your database]
Alessio Fabiani wrote:
Hi guys,
I have a postgis datastore in GeoServer 1.3.0-RC4.SP1.
Trying to send the following request:
<?xml version="1.0" encoding="iso-8859-1"?>
<GetFeature outputFormat="GML2" xmlns:gml="http://www.opengis.net/gml">
<Query typeName="NURC:Main">
<PropertyName>/Main/Source</PropertyName>
<PropertyName>/Main/Year</PropertyName>
<Filter>
<And>
<FeatureId fid="234"/>
<BBOX>
<PropertyName>/Main/the_geom</PropertyName>
<gml:Box>
<gml:coord>
<gml:X>1</gml:X>
<gml:Y>40</gml:Y>
</gml:coord>
<gml:coord>
<gml:X>12</gml:X>
<gml:Y>56</gml:Y>
</gml:coord>
</gml:Box>
</BBOX>
<PropertyIsEqualTo>
<PropertyName>/Main/Year</PropertyName>
<Literal>1988</Literal>
</PropertyIsEqualTo>
</And>
</Filter>
</Query>
</GetFeature>
GeoServer produces the following Exception:
org.geotools.data.DataSourceException: Error Performing SQL query: SELECT "ID", "Source", "Year" FROM "Main" WHERE ((ID = '234') AND "the_geom" && GeometryFromText('POLYGON ((1 40, 1 56, 12 56, 12 40, 1 40))', -1) AND "Year" = 1988)
....
Caused by: org.postgresql.util.PSQLException: ERROR: column "id" does not exist
Infact the SQL string is wrong, it should be:
... FROM "Main" WHERE (("ID" = '234') AND ...
instead of
... FROM "Main" WHERE ((ID = '234') AND ...
Does anyone knows the cuse?
Thanks,
Alessio.
--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org