blob: d1009ef1e60a1ccac74ef745663a4d04440135de (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 | #!/bin/dash
# psql plugin
#
# uses psql to download a table (or view) of the form:
# CREATE TABLE known_hosts (
#	namelist	text, # comma seperated
#	type		text,
#	key		text
# );
#
# ENVIRONMENT VARIABLES:
#	TABLE		table to download
# used by psql:
#	PGCLUSTER	see pg_wrapper(1)
#	PGDATABASE	see psql(1)
#	PGUSER		..
#	PGPASSFILE	..
#
set -e
psql -F ' ' -Atc "SELECT * FROM ${TABLE}" > new
# vim:set ft=sh:
 |