Tag: postgresql 9.3

无法通过bash脚本创buildpostgres扩展

在Docker容器中启动了一个postgres数据库,然后想用以下脚本安装扩展: su postgres sh -c "psql -U postgres <<EOSQL CREATE EXTENSION hstore; CREATE EXTENSION postgis; CREATE EXTENSION postgis_topology; CREATE EXTENSION fuzzystrmatch; EOSQL" trap "echo \"Sending SIGTERM to postgres\"; killall -s SIGTERM postgres" SIGTERM su postgres sh -c "$POSTGRES -D $DATADIR -c config_file=$CONF" & wait $! 但它什么都不做,在扩展列表中只安装了一个默认的plpgsql。 但如果我input容器 docker exec -it osm-database bash 并按顺序在cli中运行以下命令 su postgres […]

在Docker容器中安装PostgreSQL

我一直在跟随几个不同的教程以及正式的教程,但是每当我尝试在一个容器中安装PostgreSQL时,我会收到以下消息 psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"? 我已经通过在这里和整个互联网上看到了几个问题,但没有运气。