johann sorel ha scritto:
> Hi,
> 
> I have uncounter a strange problem in the postgis module.
> 
> I am trying to use a postgis datastores, It works fine for tables but 
> when you try to
> use a view you MUST have a field named "oid".
> In fact this "oid" name is hard coded in the module source and it goes 
> crazy when you
> try to open a view that doesnt have this field.
> 
> Can someone explain me why there is such a thing ?
> And eventually how can I avoid to have this field in my postgis views.

oid was a field old Postgres versions always had and that has been
removed in the latest versions (during the last 2-3 years actually).
It was a sort of implicit primary key, no two records in the same
database could have the save oid value.
The postgis datastore can use that as a pk when no other is available.
Yet, I'm pretty sure many GeoServer users are using views without
any oid field and it works fine.

Can you detail a little more your use case, provide a database
dump and a stand alone test case?
The most likely thing is that you're hitting the
datastore in a way that GeoServer is not using, I need details
to replicate the issue.

Cheers
Andrea

-- 
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to