Merge pull request #829 from stefanneuhaus/fix-postgres-save-properties

Fix save_properties on Postgres
This commit is contained in:
Jeremy Long
2017-07-29 22:14:42 -04:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@@ -512,7 +512,7 @@ public final class CveDB implements AutoCloseable {
if (mergeProperty != null) {
mergeProperty.setString(1, key);
mergeProperty.setString(2, value);
mergeProperty.executeUpdate();
mergeProperty.execute();
} else {
// No Merge statement, so doing an Update/Insert...
final PreparedStatement updateProperty = getPreparedStatement(UPDATE_PROPERTY);

View File

@@ -12,5 +12,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.
MERGE_PROPERTY=CALL save_property(?, ?)
CLEANUP_ORPHANS=DELETE FROM cpeEntry WHERE id IN (SELECT id FROM cpeEntry LEFT JOIN software ON cpeEntry.id = software.CPEEntryId WHERE software.CPEEntryId IS NULL);
MERGE_PROPERTY=SELECT save_property(?, ?)
CLEANUP_ORPHANS=DELETE FROM cpeEntry WHERE id IN (SELECT id FROM cpeEntry LEFT JOIN software ON cpeEntry.id = software.CPEEntryId WHERE software.CPEEntryId IS NULL);