Index: openacs-4/packages/acs-kernel/acs-kernel.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/acs-kernel.info,v
diff -u -r1.136.2.8 -r1.136.2.9
--- openacs-4/packages/acs-kernel/acs-kernel.info 11 Apr 2016 14:27:31 -0000 1.136.2.8
+++ openacs-4/packages/acs-kernel/acs-kernel.info 28 Apr 2016 12:56:11 -0000 1.136.2.9
@@ -9,15 +9,15 @@
f
t
-
+
OpenACS Core Team
Routines and data models providing the foundation for OpenACS-based Web services.
2015-10-04
OpenACS
The OpenACS kernel contains the core datamodel create and drop scripts for such things as objects, groups, partiies and the supporting PL/SQL and PL/pgSQL procedures.
3
-
+
Index: openacs-4/packages/acs-kernel/sql/postgresql/postgresql.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/postgresql.sql,v
diff -u -r1.48 -r1.48.2.1
--- openacs-4/packages/acs-kernel/sql/postgresql/postgresql.sql 27 Oct 2014 16:39:36 -0000 1.48
+++ openacs-4/packages/acs-kernel/sql/postgresql/postgresql.sql 28 Apr 2016 12:56:11 -0000 1.48.2.1
@@ -2,8 +2,8 @@
-- used to support anonymous plsql blocks in the db_plsql function call in tcl.
create sequence t_anon_func_seq;
-create view anon_func_seq as
-select nextval('t_anon_func_seq') as nextval;
+-- create view anon_func_seq as
+-- select nextval('t_anon_func_seq') as nextval;
Index: openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/Attic/00-database-procs.tcl,v
diff -u -r1.88.2.7 -r1.88.2.8
--- openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl 5 Jan 2016 14:23:35 -0000 1.88.2.7
+++ openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl 28 Apr 2016 12:56:11 -0000 1.88.2.8
@@ -420,36 +420,39 @@
# - gustaf neumann (18.5.2008)
#
if {![info exists ::db::sequences]} {
- ns_log notice "-- creating per thread sequence table"
- namespace eval ::db {}
- foreach s [db_list -dbn $dbn relnames "select relname, relkind from pg_class where relkind = 'S'"] {
- set ::db::sequences($s) 1
- }
+ ns_log notice "-- creating per thread sequence table"
+ namespace eval ::db {}
+ foreach s [db_list -dbn $dbn relnames "select relname, relkind from pg_class where relkind = 'S'"] {
+ set ::db::sequences($s) 1
+ }
}
if {[info exists ::db::sequences(t_$sequence)]} {
- #ns_log notice "-- found t_$sequence"
- set nextval [db_string -dbn $dbn nextval "select nextval('t_$sequence')"]
+ #ns_log notice "-- found t_$sequence"
+ set nextval [db_string -dbn $dbn nextval "select nextval('t_$sequence')"]
+ ad_log Warning "Deprecated sequence name '$sequence' is used. Use instead 't_$sequence'"
} elseif {[info exists ::db::sequences($sequence)]} {
- #ns_log notice "-- found $sequence"
- set nextval [db_string -dbn $dbn nextval "select nextval('$sequence')"]
+ #ns_log notice "-- found $sequence"
+ set nextval [db_string -dbn $dbn nextval "select nextval('$sequence')"]
} elseif { [db_0or1row -dbn $dbn nextval_sequence "
select nextval('${sequence}') as nextval
where (select relkind
from pg_class
where relname = '${sequence}') = 'S'
"]} {
- #
- # We do not have an according sequence-table. Use the system catalog to check
- # for the sequence
- #
- # ... the query sets nextval if it succeeds
- #
+ #
+ # We do not have an according sequence-table. Use the system catalog to check
+ # for the sequence
+ #
+ # ... the query sets nextval if it succeeds
+ #
+ ad_log Warning "Probably deprecated sequence name '$sequence' is used (no sequence table found)"
} else {
- #
- # finally, there might be a view with a nextval
- #
- ns_log debug "db_nextval: sequence($sequence) is not a real sequence. perhaps it uses the view hack."
- set nextval [db_string -dbn $dbn nextval "select nextval from $sequence"]
+ #
+ # finally, there might be a view with a nextval
+ #
+ ns_log debug "db_nextval: sequence($sequence) is not a real sequence. perhaps it uses the view hack."
+ set nextval [db_string -dbn $dbn nextval "select nextval from $sequence"]
+ ad_log Warning "Using deprecated sequence view hack for '$sequence'. Is there not real sequence?"
}
return $nextval
@@ -779,7 +782,7 @@
set sql [db_qd_replace_sql $statement_name $pre_sql]
- set unique_id [db_nextval "anon_func_seq"]
+ set unique_id [db_nextval "t_anon_func_seq"]
set function_name "__exec_${unique_id}_${fname}"