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.9 -r1.136.2.10
--- openacs-4/packages/acs-kernel/acs-kernel.info 28 Apr 2016 12:56:11 -0000 1.136.2.9
+++ openacs-4/packages/acs-kernel/acs-kernel.info 29 Apr 2016 07:56:56 -0000 1.136.2.10
@@ -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.2.1 -r1.48.2.2
--- openacs-4/packages/acs-kernel/sql/postgresql/postgresql.sql 28 Apr 2016 12:56:11 -0000 1.48.2.1
+++ openacs-4/packages/acs-kernel/sql/postgresql/postgresql.sql 29 Apr 2016 07:56:56 -0000 1.48.2.2
@@ -1,12 +1,8 @@
create view dual as select now() as sysdate;
-- 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 sequence anon_func_seq;
-
-
--
-- procedure instr/4
--
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.9.1d3-5.9.1d4.sql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/acs-tcl/acs-tcl.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/acs-tcl.info,v
diff -u -r1.70.2.11 -r1.70.2.12
--- openacs-4/packages/acs-tcl/acs-tcl.info 11 Apr 2016 14:27:31 -0000 1.70.2.11
+++ openacs-4/packages/acs-tcl/acs-tcl.info 29 Apr 2016 07:56:56 -0000 1.70.2.12
@@ -9,7 +9,7 @@
f
t
-
+
OpenACS
The Kernel Tcl API library.
2015-10-04
@@ -18,9 +18,9 @@
GPL version 2
3
-
+
-
+
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.8 -r1.88.2.9
--- openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl 28 Apr 2016 12:56:11 -0000 1.88.2.8
+++ openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl 29 Apr 2016 07:56:56 -0000 1.88.2.9
@@ -412,13 +412,21 @@
# sequence name. Checking this at runtime is unnecessary
# complex and costly.
#
- # The best solution would certainly be to call db_nextval
- # only with real sequence names. In that case, the whole
- # function would for postgres would collapse to a single
- # line, without any need for sequence name caching.
+ # The best solution would certainly be to call "db_nextval"
+ # only with real sequence names (as defined in SQL). In that
+ # case, the whole function would for postgres would collapse
+ # to a single line, without any need for sequence name
+ # caching. But in that case, one should rename the sequences
+ # from t_SEQUENCE to SEQUENCE for postgres.
#
- # - gustaf neumann (18.5.2008)
- #
+ # However, since Oracle uses the pseudo column ".nextval",
+ # which is emulated via the view, it is not clear, how
+ # feasible this is to remove all such views without breaking
+ # installed applications. We keep for such cases the view,
+ # but nevertheless, the function "db_nextval" should always
+ # be called with names without the "t_" prefix to achieve
+ # Oracle compatibility.
+
if {![info exists ::db::sequences]} {
ns_log notice "-- creating per thread sequence table"
namespace eval ::db {}
@@ -429,10 +437,12 @@
if {[info exists ::db::sequences(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')"]
+ if {[string match t_* $sequence]} {
+ ad_log Warning "For portability, db_nextval should be called without the leading 't_' prefix: 't_$sequence'"
+ }
} elseif { [db_0or1row -dbn $dbn nextval_sequence "
select nextval('${sequence}') as nextval
where (select relkind
@@ -782,7 +792,7 @@
set sql [db_qd_replace_sql $statement_name $pre_sql]
- set unique_id [db_nextval "t_anon_func_seq"]
+ set unique_id [db_nextval "anon_func_seq"]
set function_name "__exec_${unique_id}_${fname}"