aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Wieck <JanWieck@Yahoo.com>1999-05-12 10:35:44 +0000
committerJan Wieck <JanWieck@Yahoo.com>1999-05-12 10:35:44 +0000
commitca00c902fbda4d5f4027429ca0b6a957a02505fc (patch)
tree446a80731882e8fec96cbc4db18dd9e87db5ecfb /src
parent6a982fc6a78dca82d88520cbb1a2a23f981936ce (diff)
downloadpostgresql-ca00c902fbda4d5f4027429ca0b6a957a02505fc.tar.gz
postgresql-ca00c902fbda4d5f4027429ca0b6a957a02505fc.zip
Added installation of created procedural languages to initdb
Jan
Diffstat (limited to 'src')
-rw-r--r--src/bin/initdb/Makefile6
-rw-r--r--src/bin/initdb/initdb.sh22
-rw-r--r--src/test/regress/sql/tests1
3 files changed, 25 insertions, 4 deletions
diff --git a/src/bin/initdb/Makefile b/src/bin/initdb/Makefile
index 9931e07f17f..1f92057c014 100644
--- a/src/bin/initdb/Makefile
+++ b/src/bin/initdb/Makefile
@@ -7,7 +7,7 @@
#
#
# 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 $
#
#-------------------------------------------------------------------------
@@ -17,7 +17,9 @@ include ../../Makefile.global
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)/$<
diff --git a/src/bin/initdb/initdb.sh b/src/bin/initdb/initdb.sh
index 76ddb6468b2..b8316e26939 100644
--- a/src/bin/initdb/initdb.sh
+++ b/src/bin/initdb/initdb.sh
@@ -26,7 +26,7 @@
#
#
# 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 $
#
#-------------------------------------------------------------------------
@@ -491,6 +491,26 @@ echo "CREATE RULE \"_RETpg_indexes\" AS ON SELECT TO pg_indexes DO INSTEAD \
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
diff --git a/src/test/regress/sql/tests b/src/test/regress/sql/tests
index 795cd11de4d..5f965d535fc 100644
--- a/src/test/regress/sql/tests
+++ b/src/test/regress/sql/tests
@@ -66,6 +66,5 @@ alter_table
portals_p2
rules
limit
-install_plpgsql
plpgsql
temp