[TinyOWS-dev] [tinyows] #15: Insert transaction doesn't return id of features in the response
Normand Savard
nsavard at mapgears.com
Tue Apr 21 13:33:10 EST 2009
Olivier Courtin wrote:
>
>> Next, I don't think we need to generate a random id when idgen =
>> Generatenew or when idgen = ReplaceDuplicate. For my part I would take
>> the id of the last feature in the layer and increment it by one. I think
>> it will be simpler to manage.
>>
>
>
> Yes for serial PostgreSQL type it could be done quite easily,
> but what about other data types ? :
>
> - varchar one
>
> - (long) int one
> - > with collision risk on several simultaneous requests
>
>
> On the other hand a reliable random id generator ANSI compliant
> could be a pain to implement, i took any suggestion ! :)
>
Olivier,
Why not let Postgresql manage that? I mean insert a feature with no id
at all and retrieve the last inserted value from the layer sequence
table. This is what I did to make Alexandre Tinyows version works.
What do you think? If you want I could send you what I did.
Norm
More information about the TinyOWS-dev
mailing list