[postgis] Connection problem
Searle Ross
Ross.Searle at nrm.qld.gov.au
Wed Feb 6 22:39:07 PST 2002
I am having a problem getting postgis to return polygon data to
mapserver. I have got postgis running in the configuration as per below.
I can return point data no worries but when I try to view polygon info I
get the following mapserver error :-
msPOSTGISLayerWhichShapes(): Query error. Error executing POSTGIS SQL
statement (in FETCH ALL): DECLARE mycursor BINARY CURSOR FOR SELECT
asbinary(force_collection(force_2d(the_geom)),'NDR'),oid::text from
hydro WHERE the_geom && setSRID('BOX3D(147.346621621622
-28.52,155.153378378378 -23.27)'::BOX3D,
find_srid('','hydro','the_geom') )
The postmaster also logs the following message at the same time
pq_flush: send() failed: Connection reset by peer
pq_flush: send() failed: Connection reset by peer
pq_flush: send() failed: Connection reset by peer
pq_flush: send() failed: Connection reset by peer
pq_flush: send() failed: Connection reset by peer
pq_flush: send() failed: Connection reset by peer
pq_flush: send() failed: Connection reset by peer
pq_flush: send() failed: Connection reset by peer
pq_flush: send() failed: Connection reset by peer
pq_recvbuf: recv() failed: Connection reset by peer
The fetch statement appears to run OK in the psql client. ie it fetchs
some records.
Anyone got any ideas
Thanks
Ross
-----Original Message-----
From: Nicolas Ribot [mailto:nicol at ribot.com]
Sent: Wednesday, 6 February 2002 7:52 PM
To: postgis at yahoogroups.com
Subject: Re: [postgis] Connection problem
Hi Ross,
I'm using the same configuration to run some postgis tests (NT + cygwin
and
Windows2000 +
cygwin).
Some tips:
- You should include the complete set of parameters in the connection
string:
user= password= host= port=
- In some earlier MapServer versions, you must include a FILTER clause,
even
if a full select is
intended. My mapfile looks like, for a layer:
layer
connectiontype postgis
name "communes"
CONNECTION "user=postgres password=postgres dbname=test_postgis
host=pc-dev1
port=5432"
DATA "geo_value from communes"
FILTER "1=1"
status on
type polygon
class
name "rien"
outlinecolor 0 0 0
end
end
- Finally, is postmaster running with the -i option ?
I hope this helps.
Nicolas
-------------------------------------------------------------
Searle Ross wrote:
Hi,
I am having a problem connecting to postgres. I get the following
error
:-
msPOSTGISLayerOpen(): Query error. Error parsing POSTGIS connection
information
I have tried numerous permutations of the string as in the postgis
docs
but no luck
The connection stuff in my mapfile is :-
LAYER
NAME bioreg
TYPE POLYGON
CONNECTIONTYPE postgis
CONNECTION "dbname=veg user=postgres"
DATA "geo_value from bio_reg2"
The environment I'm running in is postgres compiled under cygwin and
the
winNT mapserv executable as compiled by Perry Nacionales
Any one got any ideas
Thanks
Ross
To unsubscribe from this group, send an email to:
postgis-unsubscribe at yahoogroups.com
Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
************************************************************************
The information in this e-mail together with any attachments is
intended only for the person or entity to which it is addressed
and may contain confidential and/or privileged material.
Any form of review, disclosure, modification, distribution
and/or publication of this e-mail message is prohibited.
If you have received this message in error, you are asked to
inform the sender as quickly as possible and delete this message
and any copies of this message from your computer and/or your
computer system network.
************************************************************************
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Sponsored by VeriSign - The Value of Trust
Pinpoint the right security solution for your company - FREE
Guide from industry leader VeriSign gives you all the facts.
http://us.click.yahoo.com/pCuuSA/WdiDAA/yigFAA/PhFolB/TM
---------------------------------------------------------------------~->
To unsubscribe from this group, send an email to:
postgis-unsubscribe at yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the postgis-users
mailing list