[Spacewalk-list] NVL keyword

Pierre Casenove pcasenove at gmail.com
Tue Jun 26 17:20:49 UTC 2012


Hello,
After commit 69a1bcc647b89c36b35fcd5a735f6b521b612db4, I've looked at
System_queries.xml file, searching for "NVL((SELECT 1" string.
I found only one, in query
1199	<mode name="config_managed_systems">
1200	  <query name="available_to_user" />
1201	  <elaborator>
1202	SELECT S.id,
1203	       NVL((SELECT SCC.config_channel_id
1204	              FROM rhnConfigChannelType CCT, rhnConfigChannel CC,
rhnServerConfigChannel SCC
1205	             WHERE SCC.server_id = S.id
1206	               AND SCC.config_channel_id = CC.id
1207	               AND CC.confchan_type_id = CCT.id
1208	               AND CCT.label = 'local_override'), 0) CCID,
1209	       (SELECT COUNT(CF.id)
1210	          FROM rhnConfigFile CF, rhnConfigChannelType CCT,
rhnConfigChannel CC, rhnServerConfigChannel SCC
1211	         WHERE SCC.server_id = S.id
1212	           AND SCC.config_channel_id = CC.id
1213	           AND CC.confchan_type_id = CCT.id
1214	           AND CF.config_channel_id = CC.id
1215	           AND CCT.label = 'local_override') LOCAL_FILE_COUNT,
1216	       NVL((SELECT COUNT(SCC.config_channel_id)
1217	              FROM rhnConfigChannelType CCT, rhnConfigChannel CC,
rhnServerConfigChannel SCC
1218	             WHERE SCC.server_id = S.id
1219	               AND SCC.config_channel_id = CC.id
1220	               AND CC.confchan_type_id = CCT.id
1221	               AND CCT.label = 'normal'), 0) CONF_CHANNEL_COUNT,
1222	       NVL((SELECT 1
1223	              FROM rhnServerFeaturesView SFV
1224	             WHERE SFV.server_id = S.id
1225	               AND SFV.label = 'ftr_config'), 0) AS SELECTABLE
1226	  FROM rhnServer S
1227	 WHERE S.id IN (%s)
1228	  </elaborator>
1229	  <elaborator name="entitlements"/>
1230	</mode>

I was not able to find in which page this query is call, but it should
fail on PGSQL.
Is this query still used? If so, where in the code?

Thanks,

PIerre




More information about the Spacewalk-list mailing list