[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Spacewalk-list] Patch to address PGSQL ISE



Hello list,
The sysdate word is used in the queries used to remove or add a solaris patch to a channel.
Please find attached a patch to correct this.
Tested on spacewalk 1.8 with pgsql on rhel 5.


Pierre

From 9fbc4efbd1c98340a8bb458d8a2faf3c5edea55f Mon Sep 17 00:00:00 2001
From: root <root tu-spa-d15 cst cnes fr>
Date: Tue, 4 Dec 2012 17:13:05 +0000
Subject: [PATCH] Remove sysdate keyword

---
 web/modules/rhn/RHN/DB/Channel.pm                  |    4 ++--
 .../sniglets/Sniglets/ListView/PackageList.pm      |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/web/modules/rhn/RHN/DB/Channel.pm b/web/modules/rhn/RHN/DB/Channel.pm
index 9ec6db7..70d69f7 100644
--- a/web/modules/rhn/RHN/DB/Channel.pm
+++ b/web/modules/rhn/RHN/DB/Channel.pm
@@ -857,7 +857,7 @@ INSERT
   INTO rhnRepoRegenQueue
         (id, channel_label, client, reason, force, bypass_filters, next_action, created, modified)
 VALUES (sequence_nextval('rhn_repo_regen_queue_id_seq'),
-        :label, 'perl-web::remove_packages_in_set', NULL, 'N', 'N', sysdate, sysdate, sysdate)
+        :label, 'perl-web::remove_packages_in_set', NULL, 'N', 'N', current_timestamp, current_timestamp, current_timestamp)
 EOQ

   $sth->execute_h(label => $self->label);
@@ -893,7 +893,7 @@ INSERT
   INTO rhnRepoRegenQueue
         (id, channel_label, client, reason, force, bypass_filters, next_action, created, modified)
 VALUES (sequence_nextval('rhn_repo_regen_queue_id_seq'),
-        :label, 'perl-web::add_packages_in_set', NULL, 'N', 'N', sysdate, sysdate, sysdate)
+        :label, 'perl-web::add_packages_in_set', NULL, 'N', 'N', current_timestamp, current_timestamp, current_timestamp)
 EOQ

   $sth->execute_h(label => $self->label);
diff --git a/web/modules/sniglets/Sniglets/ListView/PackageList.pm b/web/modules/sniglets/Sniglets/ListView/PackageList.pm
index b033187..b0aac53 100644
--- a/web/modules/sniglets/Sniglets/ListView/PackageList.pm
+++ b/web/modules/sniglets/Sniglets/ListView/PackageList.pm
@@ -1163,7 +1163,7 @@ INSERT
   INTO rhnRepoRegenQueue
         (id, channel_label, client, reason, force, bypass_filters, next_action, created, modified)
 VALUES (sequence_nextval('rhn_repo_regen_queue_id_seq'),
-        :label, 'perl-web::delete_packages_cb', NULL, 'N', 'N', sysdate, sysdate, sysdate)
+        :label, 'perl-web::delete_packages_cb', NULL, 'N', 'N', current_timestamp, current_timestamp, current_timestamp)
 EOQ

   foreach my $cid (@channels) {
--
1.7.4.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]