#
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/bin/initdb/Makefile,v 1.11 1998/07/26 04:31:16 scrappy Exp $
+# $Header: /cvsroot/pgsql/src/bin/initdb/Makefile,v 1.12 1999/05/12 10:35:43 wieck Exp $
#
#-------------------------------------------------------------------------
all: initdb
initdb: initdb.sh
- sed 's/__MULTIBYTE__/$(MULTIBYTE)/' initdb.sh > initdb
+ sed -e 's/__MULTIBYTE__/$(MULTIBYTE)/' \
+ -e 's/__DLSUFFIX__/$(DLSUFFIX)/' \
+ initdb.sh > initdb
install: initdb
$(INSTALL) $(INSTL_EXE_OPTS) $< $(BINDIR)/$<
#
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.58 1999/03/17 22:53:25 momjian Exp $
+# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.59 1999/05/12 10:35:43 wieck Exp $
#
#-------------------------------------------------------------------------
AND I.oid = X.indexrelid;" | \
postgres $PGSQL_OPT template1 > /dev/null
+if [ -f $PGLIB/plpgsql__DLSUFFIX__ ] ; then
+ echo "Installing PL/pgSQL as trusted procedural language"
+ echo "CREATE FUNCTION plpgsql_call_handler () RETURNS opaque \
+ AS '$PGLIB/plpgsql__DLSUFFIX__' LANGUAGE 'C';" | \
+ postgres $PGSQL_OPT template1 > /dev/null
+ echo "CREATE TRUSTED PROCEDURAL LANGUAGE 'plpgsql' \
+ HANDLER plpgsql_call_handler LANCOMPILER 'PL/pgSQL';" | \
+ postgres $PGSQL_OPT template1 > /dev/null
+fi
+
+if [ -f $PGLIB/pltcl__DLSUFFIX__ ] ; then
+ echo "Installing PL/Tcl as trusted procedural language"
+ echo "CREATE FUNCTION pltcl_call_handler () RETURNS opaque \
+ AS '$PGLIB/pltcl__DLSUFFIX__' LANGUAGE 'C';" | \
+ postgres $PGSQL_OPT template1 > /dev/null
+ echo "CREATE TRUSTED PROCEDURAL LANGUAGE 'pltcl' \
+ HANDLER pltcl_call_handler LANCOMPILER 'PL/Tcl';" | \
+ postgres $PGSQL_OPT template1 > /dev/null
+fi
+
echo "Loading pg_description"
echo "copy pg_description from '$TEMPLATE_DESCR'" | \
postgres $PGSQL_OPT template1 > /dev/null