From 1593c21031cf2682236e6d530107a943e80dd6fb Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Sat, 14 Jul 2012 10:59:48 -0400 Subject: [PATCH] Chugging through the 'basics' tutorial mostly for fun ... and to see if I'm missing any foundational bits. --- postgresql/installation/Makefile | 3 ++- postgresql/installation/postgresql.conf | 10 +++++----- postgresql/tutorial/weather/init.sql | 12 ++++++++++++ postgresql/tutorial/weather/wipe.sql | 2 ++ 4 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 postgresql/tutorial/weather/init.sql create mode 100644 postgresql/tutorial/weather/wipe.sql diff --git a/postgresql/installation/Makefile b/postgresql/installation/Makefile index bb7a6fe..5b27a86 100644 --- a/postgresql/installation/Makefile +++ b/postgresql/installation/Makefile @@ -14,8 +14,9 @@ start: $(HERE)/bin/pg_ctl $(HERE)/data $(HERE)/log stop: $(HERE)/bin/pg_ctl $(HERE)/data $(HERE)/log $(HERE)/bin/pg_ctl stop -D $(HERE)/data +# pg_ctl restart isn't quite what I want... restart: $(HERE)/bin/pg_ctl $(HERE)/data $(HERE)/log - $(HERE)/bin/pg_ctl restart -D $(HERE)/data + $(MAKE) stop && $(MAKE) start $(TARBALL_BASENAME).tar.bz2: curl -L -O $(TARBALL_URL) diff --git a/postgresql/installation/postgresql.conf b/postgresql/installation/postgresql.conf index 2b46732..a5f18fd 100644 --- a/postgresql/installation/postgresql.conf +++ b/postgresql/installation/postgresql.conf @@ -317,7 +317,7 @@ wal_level = hot_standby # minimal, archive, or hot_standby # - When to Log - -client_min_messages = debug1 # values in order of decreasing detail: +client_min_messages = warning # values in order of decreasing detail: # debug5 # debug4 # debug3 @@ -364,10 +364,10 @@ log_min_duration_statement = 0 # -1 is disabled, 0 logs all statements # - What to Log - -debug_print_parse = on -debug_print_rewritten = on -debug_print_plan = on -debug_pretty_print = on +debug_print_parse = off +debug_print_rewritten = off +debug_print_plan = off +debug_pretty_print = off log_checkpoints = on log_connections = on log_disconnections = on diff --git a/postgresql/tutorial/weather/init.sql b/postgresql/tutorial/weather/init.sql new file mode 100644 index 0000000..4d8c2d1 --- /dev/null +++ b/postgresql/tutorial/weather/init.sql @@ -0,0 +1,12 @@ +CREATE TABLE weather ( + city varchar(80), + temp_lo int, + temp_hi int, + prcp real, + date date +); + +CREATE TABLE cities ( + name varchar(80), + location point +); diff --git a/postgresql/tutorial/weather/wipe.sql b/postgresql/tutorial/weather/wipe.sql new file mode 100644 index 0000000..8ec9fcb --- /dev/null +++ b/postgresql/tutorial/weather/wipe.sql @@ -0,0 +1,2 @@ +DROP TABLE IF EXISTS weather; +DROP TABLE IF EXISTS cities;