[postgis-users] ESRI Shapes from database

Lee Keel lee.keel at uai.com
Tue Oct 16 11:02:44 PDT 2007


> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-
> bounces at postgis.refractions.net] On Behalf Of Chris Hermansen
> Sent: Tuesday, October 16, 2007 12:50 PM
> To: PostGIS Users Discussion
> Subject: Re: [postgis-users] ESRI Shapes from database
> 
> If I understand correctly, you have written a C# program to read the
> geodatabase on the SQL Server and you're trying to transform that into a
> string you can pass into PostgreSQL.  And your string is too big.
> 
> Given that you've got that far, why don't you just change your C#
> program to write the data out to a text file (or several text files if
> necessary) as SQL containing a CREATE statement, a bunch of INSERT
> statements or a COPY statement (probably more efficient with such a big
> table, but if your size limitation hampers you, you could fall back to
> INSERTs or even a few COPY statements), and finally add a spatial index.
> 
> If you need a template for that, grab a shape file and use shp2pgsql to
> generate a sample from which you can design your own output.
> 
> Then you can use psql to process that text file (those text files ).
> 
[Lee Keel] 
My only reason I haven't used the file approach is that I need this to be
run nightly and I can't find a command line option to pass a password into
psql for the input of the file.  The user that I am having to use for this
account requires a password and it is an act of congress (almost literally)
to get trust accounts on this server that have just read access.  I don't
think there is anyway that they are going to let me have a trust account
with write access.  Am I missing something about the command line options
for psql?

Thanks,
-LK
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.



More information about the postgis-users mailing list