File: run_sql.sh

package info (click to toggle)
timescaledb 2.26.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,772 kB
  • sloc: ansic: 60,125; sql: 24,806; sh: 1,896; python: 1,290; perl: 78; makefile: 14
file content (14 lines) | stat: -rwxr-xr-x 297 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env bash

# To avoid pw writing, add localhost:5432:*:postgres:test to ~/.pgpass
set -u
set -e

PWD=$(pwd)
DIR=$(dirname $0)

export PGUSER=${PGUSER:-postgres}
export PGHOST=${PGHOST:-localhost}
export PGDATABASE=${PGDATABASE:-timescaledb}

psql -v ON_ERROR_STOP=1 -q -X -f $DIR/sql/$1