<table cellspacing='0' cellpadding='0' border='0' ><tr><td valign='top' style='font: inherit;'><P>Ritesh,</P>
<P>&nbsp;</P>
<P>There's a way to stablish the default schema to a postgres user when it connects, maybe this can help you to pull the data from postgres.</P>
<P>&nbsp;</P>
<P>To check what's the current default user's schema, you need to execute this:</P>
<P>&nbsp;</P>
<P>SHOW search_path</P>
<P>&nbsp;</P>
<P>It must throw $user, public</P>
<P>&nbsp;</P>
<P>So, to set the default user's schema, you execute this:</P>
<P>&nbsp;</P>
<P>ALTER <SPAN class=highlight1>USER</SPAN>&nbsp;&lt;user_name&gt; SET search_path TO &lt;schema_name&gt;</P>
<P>&nbsp;</P>
<P>I suggest you to create a new role to connect to the database via map file, and then </P>
<P>change its default schema.</P>
<P>&nbsp;</P>
<P>Another thing (maybe this was the first step) is to check if the user postgres is the owner </P>
<P>of the schema, and if it's not, then check if it haves the USAGE privilege on it.</P>
<P>&nbsp;</P>
<P>Hope this information helps<BR></P>
<DIV><STRONG><FONT color=#0000bf>IC Carlos Ruiz</FONT></STRONG></DIV>
<DIV><STRONG><FONT color=#0000bf></FONT></STRONG>&nbsp;</DIV><BR><BR>--- On <B>Wed, 7/16/08, Ritesh Ambastha <I>&lt;group.ritesh@gmail.com&gt;</I></B> wrote:<BR>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid">From: Ritesh Ambastha &lt;group.ritesh@gmail.com&gt;<BR>Subject: RE: [MAPSERVER-USERS] Connection parameter errors while using Postgres DB Schema<BR>To: mapserver-users@lists.osgeo.org<BR>Date: Wednesday, July 16, 2008, 4:37 AM<BR><BR><PRE>Hey Venkat,

Thanks for the details. 
I understand the standard way to write a connection parameter. 

I am sure that this table "rgp_gis_gmm_100_metros" is stored in
"public"
schema of your database. 

My question is, what will you write if you keep this table in some other
schema?

Regards,


Venkatrao wrote:
&gt; 
&gt; Hi,
&gt; Here is my Example .I think it helps you.
&gt; 
&gt; Layer # Layer starts here
&gt;   Name "GMM 100" #name of the layer
&gt;   ConnectionType POSTGIS #connection type
&gt;   Connection "host=192.168.1.158 dbname=GIS password=administrator
&gt; user=postgres port=5432" #connection type.
&gt;   Data "the_geom from rgp_gis_gmm_100_metros"   #table name
&gt; 
&gt; Thanks and Regards
&gt; Venkat.
&gt; 
&gt; 
&gt; 
&gt; 
&gt; 
&gt; -----Original Message-----
&gt; From: mapserver-users-bounces@lists.osgeo.org
&gt; [mailto:mapserver-users-bounces@lists.osgeo.org] On Behalf Of Ritesh
&gt; Ambastha
&gt; Sent: Wednesday, July 16, 2008 2:44 PM
&gt; To: mapserver-users@lists.osgeo.org
&gt; Subject: [MAPSERVER-USERS] Connection parameter errors while using
&gt; Postgres
&gt; DB Schema
&gt; 
&gt; 
&gt; Hello Readers, 
&gt; 
&gt; I am facing a problem in defining the DATA path in mapserver while using
&gt; PostGIS. 
&gt; 
&gt; I have two schemas, lets say 'a' and 'b' in a database
'd'
&gt; 
&gt; Now, I want to access tables of schema 'a' in the mapserver layer.

&gt; 
&gt; I define DATA path like this: 
&gt; 
&gt; DATA "the_geom FROM a.table_name USING UNIQUE id SRID -1" 
&gt; 
&gt; Please pour in your thoughts for defining schema in the connection/data
&gt; parameters.
&gt; 
&gt; Thanks,
&gt; Ritesh Ambastha
&gt; -- 
&gt; View this message in context:
&gt;
http://www.nabble.com/Connection-parameter-errors-while-using-Postgres-DB-Sc
&gt; hema-tp18483547p18483547.html
&gt; Sent from the Mapserver - User mailing list archive at Nabble.com.
&gt; 
&gt; _______________________________________________
&gt; mapserver-users mailing list
&gt; mapserver-users@lists.osgeo.org
&gt; http://lists.osgeo.org/mailman/listinfo/mapserver-users
&gt; 
&gt; _______________________________________________
&gt; mapserver-users mailing list
&gt; mapserver-users@lists.osgeo.org
&gt; http://lists.osgeo.org/mailman/listinfo/mapserver-users
&gt; 
&gt; 

-- 
View this message in context:
http://www.nabble.com/Connection-parameter-errors-while-using-Postgres-DB-Schema-tp18483547p18483876.html
Sent from the Mapserver - User mailing list archive at Nabble.com.

_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users</PRE></BLOCKQUOTE></td></tr></table><br>