Index: openacs-4/packages/acs-tcl/tcl/00-database-procs-postgresql.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/00-database-procs-postgresql.tcl,v diff -u -r1.32 -r1.33 --- openacs-4/packages/acs-tcl/tcl/00-database-procs-postgresql.tcl 6 Aug 2002 04:56:28 -0000 1.32 +++ openacs-4/packages/acs-tcl/tcl/00-database-procs-postgresql.tcl 6 Aug 2002 15:25:03 -0000 1.33 @@ -14,14 +14,13 @@ # the following query will return a nextval if the sequnce # is of relkind = 'S' (a sequnce). if it is not of relkind = 'S' # we will try querying it as a view - db_0or1row nextval_sequence "select nextval('${sequence}') as nextval + if {[db_0or1row nextval_sequence "select nextval('${sequence}') as nextval where (select relkind from pg_class - where relname = '${sequence}') = 'S'" - if {[info exists nextval]} { + where relname = '${sequence}') = 'S'"]} { return $nextval } else { - ns_log notice "db_nextval: sequence($sequence) is not a real sequence. perhaps it uses the view hack." + ns_log debug "db_nextval: sequence($sequence) is not a real sequence. perhaps it uses the view hack." db_0or1row nextval_view "select ${sequence}.nextval as nextval" return $nextval }