[Geoserver-users] results got by 'getfeature' can sort by primary key field?(PostGIS + geoserver1.6.x)

hi.all.
as we known,the primary key can not been accessed like other column fields.
and also, when we updated the some records in postgresql, the natural records order will change.
now,i hope i got the result always sorted by primary key,even after it’s been updated.
have any ways to it?

thanks to any hips.

anigold.jin


网易邮箱10周年,技术见证辉煌

anigold ha scritto:

hi.all.
as we known,the primary key can not been accessed like other column fields.
and also, when we updated the some records in postgresql, the natural records order will change.
now,i hope i got the result always sorted by primary key,even after it's been updated.
have any ways to it?

Nope, no way to do it as of now.
A possible workarounds is to create a sorted view in your database,
and publish it as a read only feature type (the FID of the features
won't be usable anymore thought, for filters or anything else).

Cheers
Andrea

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

:frowning: if so, i need sort the records in memory myself.

thanks your reply.

anigold.jin

在2008-11-07,"Andrea Aime" <aaime@anonymised.com> 写道:
>anigold ha scritto:
>> hi.all.
>> as we known,the primary key can not been accessed like other column fields.
>> and also, when we updated the some records in postgresql, the natural 
>> records order will change.
>> now,i hope i got the result always sorted by primary key,even after it's 
>> been updated.
>> have any ways to it?
>
>Nope, no way to do it as of now.
>A possible workarounds is to create a sorted view in your database,
>and publish it as a read only feature type (the FID of the features
>won't be usable anymore thought, for filters or anything else).
>
>Cheers
>Andrea
>
>-- 
>Andrea Aime
>OpenGeo - http://opengeo.org
>Expert service straight from the developers.


网易邮箱10周年,技术见证辉煌