Skip to main content
Commonmark migration
Source Link

I'm developing a python script that uses shp2sql via subprocess.call().

The string I'm using works fine on Linux Mint:

shp2pgsql -s 4326 ../data/download.shp ccd_hoods_new | psql -h hostname -d databasename -U username -P password -q

However, when I run the script on CentOS, I'm prompted for a password, which presents a new problem when deploying and automating via CRON.

The only documentation I can find is [this cheatsheet][1]this cheatsheet, which confirms that I'm doing things correctly.

But why on the CentOS machine would it not be recognizing the -P flag?

Both servers are running the same script that points to the same host running PostgreSQL 9.6 and PostGIS 2.4. [1]: http://bostongis.com/pgsql2shp_shp2pgsql_quickguide.bqg

I'm developing a python script that uses shp2sql via subprocess.call().

The string I'm using works fine on Linux Mint:

shp2pgsql -s 4326 ../data/download.shp ccd_hoods_new | psql -h hostname -d databasename -U username -P password -q

However, when I run the script on CentOS, I'm prompted for a password, which presents a new problem when deploying and automating via CRON.

The only documentation I can find is [this cheatsheet][1], which confirms that I'm doing things correctly.

But why on the CentOS machine would it not be recognizing the -P flag?

Both servers are running the same script that points to the same host running PostgreSQL 9.6 and PostGIS 2.4. [1]: http://bostongis.com/pgsql2shp_shp2pgsql_quickguide.bqg

I'm developing a python script that uses shp2sql via subprocess.call().

The string I'm using works fine on Linux Mint:

shp2pgsql -s 4326 ../data/download.shp ccd_hoods_new | psql -h hostname -d databasename -U username -P password -q

However, when I run the script on CentOS, I'm prompted for a password, which presents a new problem when deploying and automating via CRON.

The only documentation I can find is this cheatsheet, which confirms that I'm doing things correctly.

But why on the CentOS machine would it not be recognizing the -P flag?

Both servers are running the same script that points to the same host running PostgreSQL 9.6 and PostGIS 2.4.

deleted 1 character in body
Source Link
Inactivated Account
  • 18.9k
  • 5
  • 70
  • 114

I'm developing a python script that uses shp2sql via subprocess.call().

The string I'm using works fine on Linux Mint:

shp2pgsql -s 4326 ../data/download.shp ccd_hoods_new | psql -h hostname -d databasename -U username - P password -q

However, when I run the script on CentOS, I'm prompted for a password, which presents a new problem when deploying and automating via CRON.

The only documentation I can find is [this cheatsheet][1], which confirms that I'm doing things correctly.

But why on the CentOS machine would it not be recognizing the -P flag?

Both servers are running the same script that points to the same host running PostgreSQL 9.6 and PostGIS 2.4. [1]: http://bostongis.com/pgsql2shp_shp2pgsql_quickguide.bqg

I'm developing a python script that uses shp2sql via subprocess.call().

The string I'm using works fine on Linux Mint:

shp2pgsql -s 4326 ../data/download.shp ccd_hoods_new | psql -h hostname -d databasename -U username - P password -q

However, when I run the script on CentOS, I'm prompted for a password, which presents a new problem when deploying and automating via CRON.

The only documentation I can find is [this cheatsheet][1], which confirms that I'm doing things correctly.

But why on the CentOS machine would it not be recognizing the -P flag?

Both servers are running the same script that points to the same host running PostgreSQL 9.6 and PostGIS 2.4. [1]: http://bostongis.com/pgsql2shp_shp2pgsql_quickguide.bqg

I'm developing a python script that uses shp2sql via subprocess.call().

The string I'm using works fine on Linux Mint:

shp2pgsql -s 4326 ../data/download.shp ccd_hoods_new | psql -h hostname -d databasename -U username -P password -q

However, when I run the script on CentOS, I'm prompted for a password, which presents a new problem when deploying and automating via CRON.

The only documentation I can find is [this cheatsheet][1], which confirms that I'm doing things correctly.

But why on the CentOS machine would it not be recognizing the -P flag?

Both servers are running the same script that points to the same host running PostgreSQL 9.6 and PostGIS 2.4. [1]: http://bostongis.com/pgsql2shp_shp2pgsql_quickguide.bqg

Source Link
Inactivated Account
  • 18.9k
  • 5
  • 70
  • 114

How to specify a password with shp2pgsql using CentOS?

I'm developing a python script that uses shp2sql via subprocess.call().

The string I'm using works fine on Linux Mint:

shp2pgsql -s 4326 ../data/download.shp ccd_hoods_new | psql -h hostname -d databasename -U username - P password -q

However, when I run the script on CentOS, I'm prompted for a password, which presents a new problem when deploying and automating via CRON.

The only documentation I can find is [this cheatsheet][1], which confirms that I'm doing things correctly.

But why on the CentOS machine would it not be recognizing the -P flag?

Both servers are running the same script that points to the same host running PostgreSQL 9.6 and PostGIS 2.4. [1]: http://bostongis.com/pgsql2shp_shp2pgsql_quickguide.bqg