Bug 905872
| Summary: | SW1.8 on pgsql: Errata search by CVE fails | ||
|---|---|---|---|
| Product: | [Community] Spacewalk | Reporter: | pierre.casenove |
| Component: | Server | Assignee: | Tomas Lestach <tlestach> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Red Hat Satellite QA List <satqe-list> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 1.8 | CC: | jpazdziora |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2013-03-06 18:35:19 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 917805 | ||
|
Description
pierre.casenove
2013-01-30 11:12:55 UTC
I've tried to do - ps.id = #sessionId# and + ps.id = #sessionId# + 0 and but that gives me org.postgresql.util.PSQLException: ERROR: operator does not exist: character varying + integer We can do
- args.put("sessionId", sessionId.toString());
+ args.put("sessionId", sessionId);
but that fails with
put(java.lang.String,java.lang.String) in java.util.Map<java.lang.String,java.lang.String> cannot be applied to (java.lang.String,java.lang.Long)
but we can change all the Maps from Map<String, String> to Map<String, Object> and that seems to work.
Or we could define compatibility SQL function to_number to take string and return number, along the lines of Oracle's
SQL> select to_number('123') from dual ;
TO_NUMBER('123')
----------------
123
Which approach do you prefer, Tomáš?
Changing Map<String, String> to Map<String, Object> is the preferred way. Jan, thank you for the great investigation! spacewalk.git: 8d61315e4d1f4daced19660ac7aa1acb407766a4 Marking bug as ON_QA since tonight's build of Spacewalk nightly is a release candidate for Spacewalk 1.9. Spacewalk 1.9 has been released. https://fedorahosted.org/spacewalk/wiki/ReleaseNotes19 |