java/code/src/com/redhat/rhn/common/db/datasource/xml/Action_queries.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 0cf822d36c4386e749efe9b08d0ad430afd013a5
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Thu Sep 22 13:51:00 2011 +0200
740427 - use sequence_nextval function
accorging to
https://fedorahosted.org/spacewalk/wiki/PostgreSQLPortingGuide
Addressing:
com.redhat.rhn.common.db.datasource.CachedStatement - Error while processing cached
statement sql: INSERT INTO rhnActionConfigRevision (id, server_id, action_id,
config_revision_id) values (rhn_actioncr_id_seq.nextval, ?, ?, ?)
com.redhat.rhn.common.db.WrappedSQLException: ERROR: missing FROM-clause entry for
table rhn_actioncr_id_seq at
com.redhat.rhn.common.translation.SqlExceptionTranslator.postgreSqlException(SqlExceptionTranslator.java:56)
...
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/xml/Action_queries.xml
b/java/code/src/com/redhat/rhn/common/db/datasource/xml/Action_queries.xml
index 43ac7b6..af6c9c2 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/xml/Action_queries.xml
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/xml/Action_queries.xml
@@ -313,7 +313,7 @@ INSERT INTO rhnServerAction (server_id, action_id, status,
REMAINING_TRIES)
<write-mode name="add_config_rev_to_action">
<query params="sid, aid, crid">
INSERT INTO rhnActionConfigRevision (id, server_id, action_id, config_revision_id)
- values (rhn_actioncr_id_seq.nextval, :sid, :aid, :crid)
+ values (sequence_nextval('rhn_actioncr_id_seq'), :sid, :aid, :crid)
</query>
</write-mode>