mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-01-15 08:13:43 +01:00
Fix save_properties on Postgres
“CALL save_property(.)” does not work (tested with Postgres 9.6): SQL Error [42601]: ERROR: syntax error at or near "CALL" Position: 1 org.postgresql.util.PSQLException: ERROR: syntax error at or near "CALL" Position: 1
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user