Hello,
I'm trying to set up GeoServer 1.3.0 with Postgis 1.1.1 and PostgreSQL 8. GeoServer sees and will add features in the PostGIS DB but when I try to access the features through GeoServer, I get errors: "ERROR: column "oid" does not exist."
The GeoServer queries to PostgreSQL try to select the OID. However, as I understand it, PostgreSQL 8 no longer creates OIDs by default.
So, which needs to be fixed? Do I have to create OIDs for my tables or can GeoServer be configured to not look for them?
I added the data to the DB with OGR, if the makes a difference. I didn't see any info in the OGR docs about PostgreSQL 8 and OIDs.
Thanks,
Sean
Sean Fulton wrote:
Hello,
I'm trying to set up GeoServer 1.3.0 with Postgis 1.1.1 and PostgreSQL 8. GeoServer sees and will add features in the PostGIS DB but when I try to access the features through GeoServer, I get errors: "ERROR: column "oid" does not exist."
The GeoServer queries to PostgreSQL try to select the OID. However, as I understand it, PostgreSQL 8 no longer creates OIDs by default.
So, which needs to be fixed? Do I have to create OIDs for my tables or can GeoServer be configured to not look for them?
OID's are the last default. GeoServer should try for the primary key first. It sounds like OGR probably just does not create primary keys. I believe OGR generally creates a column called FID. I think you can just modify your table to use the FID as the primary key (alter table ... add primary key (fid) or some such).
best regards,
Chris
I added the data to the DB with OGR, if the makes a difference. I didn't see any info in the OGR docs about PostgreSQL 8 and OIDs.
Thanks,
Sean
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Chris Holmes
The Open Planning Project
thoughts at: http://cholmes.wordpress.com