<HTML dir=ltr><HEAD><TITLE>RE: [postgis-users] ESRI Shapes from database</TITLE>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.2900.3199" name=GENERATOR></HEAD>
<BODY>
<DIV id=idOWAReplyText79762 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>Can you use a ..pgpass file?</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><A href="http://www.postgresql.org/docs/8.2/static/libpq-pgpass.html">http://www.postgresql.org/docs/8.2/static/libpq-pgpass.html</A></DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr>I haven't tried it with psql, but I think psql abides by it.</DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr>Hope that helps,</DIV>
<DIV dir=ltr>Regina</DIV>
<DIV dir=ltr><BR> </DIV>
<DIV dir=ltr>
<HR tabIndex=-1>
</DIV>
<DIV dir=ltr><FONT face=Tahoma size=2><B>From:</B> postgis-users-bounces@postgis.refractions.net on behalf of Lee Keel<BR><B>Sent:</B> Tue 10/16/2007 2:02 PM<BR><B>To:</B> PostGIS Users Discussion<BR><B>Subject:</B> RE: [postgis-users] ESRI Shapes from database<BR></FONT><BR></DIV></DIV>
<DIV>
<P><FONT size=2>> -----Original Message-----<BR>> From: postgis-users-bounces@postgis.refractions.net [<A href="mailto:postgis-users-">mailto:postgis-users-</A><BR>> bounces@postgis.refractions.net] On Behalf Of Chris Hermansen<BR>> Sent: Tuesday, October 16, 2007 12:50 PM<BR>> To: PostGIS Users Discussion<BR>> Subject: Re: [postgis-users] ESRI Shapes from database<BR>><BR>> If I understand correctly, you have written a C# program to read the<BR>> geodatabase on the SQL Server and you're trying to transform that into a<BR>> string you can pass into PostgreSQL.  And your string is too big.<BR>><BR>> Given that you've got that far, why don't you just change your C#<BR>> program to write the data out to a text file (or several text files if<BR>> necessary) as SQL containing a CREATE statement, a bunch of INSERT<BR>> statements or a COPY statement (probably more efficient with such a big<BR>> table, but if your size limitation hampers you, you could fall back to<BR>> INSERTs or even a few COPY statements), and finally add a spatial index.<BR>><BR>> If you need a template for that, grab a shape file and use shp2pgsql to<BR>> generate a sample from which you can design your own output.<BR>><BR>> Then you can use psql to process that text file (those text files ).<BR>><BR>[Lee Keel]<BR>My only reason I haven't used the file approach is that I need this to be<BR>run nightly and I can't find a command line option to pass a password into<BR>psql for the input of the file.  The user that I am having to use for this<BR>account requires a password and it is an act of congress (almost literally)<BR>to get trust accounts on this server that have just read access.  I don't<BR>think there is anyway that they are going to let me have a trust account<BR>with write access.  Am I missing something about the command line options<BR>for psql?<BR><BR>Thanks,<BR>-LK<BR>This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail.<BR>_______________________________________________<BR>postgis-users mailing list<BR>postgis-users@postgis.refractions.net<BR><A href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</A><BR></FONT></P></DIV></BODY></HTML>
<HTML><BODY><P><hr size=1></P>
<P><STRONG>
The substance of this message, including any attachments, may be confidential, legally privileged and/or exempt from disclosure pursuant to Massachusetts law. It is intended solely for the addressee. If you received this in error, please contact the sender and delete the material from any computer.
</STRONG></P></BODY></HTML>