[postgis-users] msPOSTGISLayerCLose() called twice
Daniel Morissette
morissette at dmsolutions.ca
Wed Aug 13 10:19:56 PDT 2003
David Blasby wrote:
> Daniel Morissette wrote:
>
>> I don't think it's right for the pooling code to call close a second
>> time, but it wouldn't hurt anyway to modify msPOSTGISLayerClose() to
>> check if the layer is still open before closing it. From MapScript
>> it's possible for a script to call $layer->close() twice, a mistake
>> that will be very common in scripts I'm sure, so it would be better if
>> calling close twice didn't crash the server but instead either
>> returned silently or produced an error.
>
>
>
> msPOSTGISLayerClose() doesnt do anything if the layer is already close.
> I just though this was quite strange that it was getting called more
> than it ought to have. I looked like an indication of a larger problem.
>
> Also, whats an itemnquery supposed to do (from the perspective of the
> layer)?
>
> dave
>
I barely ever use the mapserv CGI myself so I am not sure what
itemnquery should do so you might be better ask this on mapserver-dev.
However, looking at the source it seems that itemnquery calls
msQueryByAttributes(). And looking at msQueryByAttributes(), the
sequence of calls is:
msLayerOpen()
msLayerWhichItems() (this one is internal, it doesn't call postgis)
msLayerWhichShapes()
iterate on msLayerNextShape() until all shapes have been read
msLayerClose()
Daniel
--
------------------------------------------------------------
Daniel Morissette morissette at dmsolutions.ca
DM Solutions Group http://www.dmsolutions.ca/
------------------------------------------------------------
More information about the postgis-users
mailing list