Commit a79ff4f4 authored by kapsner's avatar kapsner

return to psql9.5

parent bccce043
...@@ -34,19 +34,18 @@ $(TBDIR_TARGETS): ...@@ -34,19 +34,18 @@ $(TBDIR_TARGETS):
# this rule not depend directly on $(TABLESPACES)% and instead call # this rule not depend directly on $(TABLESPACES)% and instead call
# $(MAKE) $(TABLESPACES)$* at the last moment # $(MAKE) $(TABLESPACES)$* at the last moment
tablespace_%: tablespace_%:
test `$(PGSQL_BIN)psql -c "select exists (select spcname from pg_tablespace where spcname = '$*')" -tA` \ test `$(PSQL_COMMAND) -c "select exists (select spcname from pg_tablespace where spcname = '$*')" -tA` \
= 't' || { \ = 't' || { \
$(MAKE) $(TABLESPACES)$*; \ $(MAKE) $(TABLESPACES)$*; \
$(PGSQL_BIN)psql -c "CREATE TABLESPACE $* LOCATION '$(TABLESPACES)$*'"; } $(PSQL_COMMAND) -c "CREATE TABLESPACE $* LOCATION '$(TABLESPACES)$*'"; }
tablespaces: $(TB_TARGETS) tablespaces: $(TB_TARGETS)
createdb: createdb:
test `$(PGSQL_BIN)psql -d template1 -c "select exists (select datname from pg_database where datname = '$(PGDATABASE)')" -tA` \ test `$(PSQL_COMMAND) -d template1 -c "select exists (select datname from pg_database where datname = '$(PGDATABASE)')" -tA` \
= 'f' || (echo -e "\e[31mERROR\e[m: Database $(PGDATABASE) already exists or connection error"; false) = 'f' || (echo -e "\e[31mERROR\e[m: Database $(PGDATABASE) already exists or connection error"; false)
$(PGSQL_BIN)createdb -T template0 -E 'UTF8' --lc-collate='en_US.UTF-8' $(PGDATABASE) $(PSQL_COMMAND) -d template1 -c "CREATE DATABASE $(PGDATABASE) TEMPLATE template0 \
# $(PSQL_COMMAND) -d template1 -c "CREATE DATABASE $(PGDATABASE) TEMPLATE template0 \ ENCODING='UTF-8' LC_COLLATE='en_US.UTF-8'"
# ENCODING='UTF-8' LC_COLLATE='en_US.UTF-8'"
# Don't depend on the SQL file, otherwise make'll try to create it # Don't depend on the SQL file, otherwise make'll try to create it
load_%: load_%:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment