Complain if script is sourced in psql, rather than via CREATE EXTENSION

This commit is contained in:
Sandro Santilli
2014-05-14 11:30:41 +02:00
parent fdc58cde73
commit 02575155ce

View File

@@ -25,7 +25,7 @@ PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
$(EXTENSION)--$(EXTVERSION).sql: $(CDBSCRIPTS) cartodb_hooks.sql cartodb_version.sql Makefile
: > $@
echo '\echo Use "CREATE EXTENSION cartodb" to load this file. \quit' > $@
cat $(CDBSCRIPTS) | \
sed -e 's/\<public\./cartodb./g' \
-e 's/:DATABASE_USERNAME/cdb_org_admin/g' >> $@