Index: openacs-4/packages/acs-bootstrap-installer/db-init-checks-postgresql.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-bootstrap-installer/db-init-checks-postgresql.tcl,v diff -u -r1.4 -r1.4.2.1 --- openacs-4/packages/acs-bootstrap-installer/db-init-checks-postgresql.tcl 5 Sep 2002 05:54:45 -0000 1.4 +++ openacs-4/packages/acs-bootstrap-installer/db-init-checks-postgresql.tcl 4 Oct 2002 07:24:20 -0000 1.4.2.1 @@ -46,8 +46,10 @@ } - ## Make sure the function is dropped - catch { ns_db dml $db "drop function __test__();" } + ## Make sure the __test__() function is dropped if it exists + if {![empty_string_p [ns_db 0or1row $db "select proname from pg_proc where proname = '__test__' and pronargs = 0"]]} { + catch { ns_db dml $db "drop function __test__();" } + } if { [catch { ns_db dml $db "create function __test__() returns integer as 'begin end;' language 'plpgsql'" } errmsg] } { append my_errors "
\n"createlang plpgsql your_database_name