Change-Id: I78b29e173654d0066852b650d4d791920fc07977 Former-commit-id:ce726f0b0d
[formerlydb8989822e
] [formerlyce726f0b0d
[formerlydb8989822e
] [formerly0a8543b6fa
[formerly ec3d2599a9c792be08ffdb67cb0de9330b37b04a]]] Former-commit-id:0a8543b6fa
Former-commit-id:e8dabda2ba
[formerly313d8554cc
] Former-commit-id:df60fe448f
11 lines
No EOL
712 B
Bash
11 lines
No EOL
712 B
Bash
#!/bin/bash
|
|
# DR #1051 remove invalid bufrmos locations
|
|
|
|
PSQL="/awips2/psql/bin/psql"
|
|
|
|
${PSQL} -U awips -d metadata -c "DELETE FROM bufrmosmrf WHERE location_id IN (SELECT DISTINCT id FROM bufrmos_location WHERE latitude > 90 or latitude < -90);"
|
|
${PSQL} -U awips -d metadata -c "DELETE FROM bufrmoshpc WHERE location_id IN (SELECT DISTINCT id FROM bufrmos_location WHERE latitude > 90 or latitude < -90);"
|
|
${PSQL} -U awips -d metadata -c "DELETE FROM bufrmos_location WHERE latitude > 90 or latitude < -90;"
|
|
${PSQL} -U awips -d metadata -c "VACUUM FULL ANALYZE bufrmosmrf;"
|
|
${PSQL} -U awips -d metadata -c "VACUUM FULL ANALYZE bufrmoshpc;"
|
|
${PSQL} -U awips -d metadata -c "VACUUM FULL ANALYZE bufrmos_location;" |