[postgis-users] ESRI Shapes from database
chris.hermansen at timberline.ca
Tue Oct 16 12:21:21 PDT 2007
Hmm, I think putting passwords on command lines in scripts kind of
invalidates the whole point of having passwords...
Talking from a "this ought to be the way" point of view, rather than
"this is the way"... if user U is authenticated on machine X and your
authentication mechanism is robust then U should also be authenticated
on machine Y, so the only time a password should be needed is if U is
trying to masquerade as someone else.
So if user U's credentials are respected on your PostgreSQL server and
if there is a role defined for user U in the PostgreSQL instance running
on the server, then s/he should be able to execute psql on that server
just by running
psql -h post-server database-name -f script.sql
Lee Keel wrote:
>> -----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?
> 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.
> postgis-users mailing list
> postgis-users at postgis.refractions.net
Chris Hermansen · mailto:clh at timberline.ca
tel:+1.604.714.2878 · fax:+1.604.733.0631
Timberline Natural Resource Group · http://www.timberline.ca
401 · 958 West 8th Avenue · Vancouver BC · Canada · V5Z 1E5
C'est ma façon de parler.
More information about the postgis-users