I am trying to create a PostGIS extension for my PostgreSQL database when running a single-user mode by using the following command:
echo "CREATE EXTENSION postgis;" | su postgres sh -c "/usr/lib/postgresql/9.2/bin/postgres --single -D /var/lib/postgresql/9.2/main --config_file=/etc/postgresql/9.2/main/postgresql.conf dbname"
UTC ERROR: type reclassarg does not exist
I am doing it while deploying a Docker container, so I cannot use
psql since the database is not running at this moment. After the Docker deployment is finished and the database is started, running
psql -d dbname -c "CREATE EXTENSION postgis;" works like a charm which means that PostGIS is installed.
What does this
type reclassarg does not exist message mean and how can I create the PostGIS extension from the single-user mode?