[Spacewalk-list] Modification of PGSQL queries
Michael Mraka
michael.mraka at redhat.com
Wed Aug 10 12:24:20 UTC 2011
Pierre Casenove wrote:
% Hello,
% Could you please review my modified queries?
%
% I also ran into another error 500 pgsql on page
% /network/software/packages/target_system_list.pxt
% I've modified query "potential_systems_for_package" in file
% /usr/lib/perl5/vendor_perl/5.8.8/RHN/DB/DataSource/xml/System_queries.xml
% and replace the NVL keyword by coalesce:
% SELECT S.id
% FROM rhnPackage P, rhnChannelPackage CP, rhnServerChannel SC, rhnServer S
% WHERE S.org_id = :org_id
% AND SC.server_id = S.id
% AND SC.channel_id = CP.channel_id
% AND CP.package_id = :pid
% AND CP.package_id = P.id
% AND COALESCE((SELECT MAX(PE.evr)
% FROM rhnServerPackage SP, rhnPackageEvr PE
% WHERE SP.name_id = P.name_id
% AND SP.server_id = S.id
% AND SP.evr_id = PE.id), (EVR_T(NULL, '0', '0'))
% )
% <
% (SELECT EVR FROM rhnPackageEVR PE WHERE PE.id = P.evr_id)
% AND EXISTS (SELECT 1 FROM rhnUserServerPerms USP WHERE USP.user_id =
% :user_id AND USP.server_id = S.id)
% ORDER BY UPPER(NVL(S.NAME, '(none)')), S.ID
Pierre please send the changes as patches (diffs). From the outout above
it's hard to guess what the actual change is.
I've commited NVL->COALESCE change to master. New package
(spacewalk-base-1.6.11-1) should be available in a moment.
% Thanks in advance for the review.
%
% Pierre
Regards,
--
Michael Mráka
Satellite Engineering, Red Hat
More information about the Spacewalk-list
mailing list