pg_createtemplate.sh
application/x-shellscript
Filename: pg_createtemplate.sh
Type: application/x-shellscript
Part: 2
Message:
Directory fsync and other fun
psql -h /tmp -p 5433 postgres <<EOF
CREATE DATABASE crashtemplate;
\c crashtemplate
CREATE FUNCTION execute(text) RETURNS void LANGUAGE plpgsql AS $body$ BEGIN EXECUTE $1;END$body$;
SELECT execute('CREATE TABLE table_'||g.i||'(id serial)') FROM generate_series(1, 3000) g(i);
EOF