Index: openacs-4/packages/xotcl-core/tcl/05-db-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/05-db-procs.tcl,v diff -u -r1.62 -r1.63 --- openacs-4/packages/xotcl-core/tcl/05-db-procs.tcl 10 Apr 2008 07:42:40 -0000 1.62 +++ openacs-4/packages/xotcl-core/tcl/05-db-procs.tcl 15 Apr 2008 12:17:16 -0000 1.63 @@ -64,6 +64,18 @@ } } + ad_proc has_hstore {} { + Check, whether hstore is available (postgres only) + } { + ns_cache eval xotcl_object_cache ::xo::has_hstore { + if {[db_driverkey ""] eq "postgresql" && + [db_string check_hstore "select count(*) from pg_proc where proname = 'hstore_in'"]} { + return 1 + } + return 0 + } + } + # # The object require provides an interface to create certain # resources in case they are not created already.