[Spacewalk-list] Modification of PGSQL queries
Pierre Casenove
pcasenove at gmail.com
Wed Aug 10 14:13:37 UTC 2011
Great and thanks a lot for your explanations.
I'm i a proxied environment, so git doesn't work (at least, I can't get it
to run). I'll do diff -u from now on.
2011/8/10 Michael Mraka <michael.mraka at redhat.com>
> 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
>
> _______________________________________________
> Spacewalk-list mailing list
> Spacewalk-list at redhat.com
> https://www.redhat.com/mailman/listinfo/spacewalk-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20110810/c3e88955/attachment.htm>
More information about the Spacewalk-list
mailing list