We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c0a1d67 + 65cd6c4 commit 820ca85Copy full SHA for 820ca85
1 file changed
templates/federated_reporting/dump.sh
@@ -58,7 +58,8 @@ log "Dumping tables: $CFE_FR_TABLES"
58
59
# in case of 3.12 must copy m_inventory as if it was __inventory
60
if [[ "$CFE_VERSION" =~ "3.12." ]]; then
61
- "$CFE_BIN_DIR"/psql cfdb -c "COPY (SELECT * FROM m_inventory) TO STDOUT CSV QUOTE '''' FORCE QUOTE *" |
+ # pg_dump will not dump the contents of views so we must run the following SQL:
62
+ "$CFE_BIN_DIR"/psql cfdb -c "COPY (SELECT * FROM m_inventory WHERE values IS NOT NULL) TO STDOUT CSV QUOTE '''' FORCE QUOTE *" |
63
sed -e 's.^.INSERT INTO __inventory (hostkey, values) VALUES (.' \
64
-e 's.$.);.'
65
fi
0 commit comments