awips2/deltaScripts/archived/13.4.1/createScanIndexes.sh
Richard Peter 55708f1d55 Issue #2854: Reorganize deltaScripts
Former-commit-id: 09f41a6b31 [formerly 56745c942e] [formerly 09f41a6b31 [formerly 56745c942e] [formerly c8e373c098 [formerly 469c2c597b80fd725f474e0d645656e4054fd69a]]]
Former-commit-id: c8e373c098
Former-commit-id: a526600e3e [formerly e1721cad00]
Former-commit-id: 18b4d133c7
2014-04-30 13:03:44 -05:00

17 lines
470 B
Bash

#!/bin/bash
# DR #1926 - this update script will create a scan index
PSQL="/awips2/psql/bin/psql"
echo "INFO: Creating scan_icao_type_idx"
${PSQL} -U awips -d metadata -c "CREATE INDEX scan_icao_type_idx ON scan USING btree (icao COLLATE pg_catalog.\"default\", type COLLATE pg_catalog.\"default\");"
if [ $? -ne 0 ]; then
echo "ERROR: Failed to create index."
echo "FATAL: The update has failed."
exit 1
fi
echo "INFO: Index created successfully!"
exit 0