Skip to content

Commit ca00c90

Browse files
Jan WieckJan Wieck
authored andcommitted
Added installation of created procedural languages to initdb
Jan
1 parent 6a982fc commit ca00c90

File tree

3 files changed

+25
-4
lines changed

3 files changed

+25
-4
lines changed

src/bin/initdb/Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
#
99
# IDENTIFICATION
10-
# $Header: /cvsroot/pgsql/src/bin/initdb/Makefile,v 1.11 1998/07/26 04:31:16 scrappy Exp $
10+
# $Header: /cvsroot/pgsql/src/bin/initdb/Makefile,v 1.12 1999/05/12 10:35:43 wieck Exp $
1111
#
1212
#-------------------------------------------------------------------------
1313

@@ -17,7 +17,9 @@ include ../../Makefile.global
1717
all: initdb
1818

1919
initdb: initdb.sh
20-
sed 's/__MULTIBYTE__/$(MULTIBYTE)/' initdb.sh > initdb
20+
sed -e 's/__MULTIBYTE__/$(MULTIBYTE)/' \
21+
-e 's/__DLSUFFIX__/$(DLSUFFIX)/' \
22+
initdb.sh > initdb
2123

2224
install: initdb
2325
$(INSTALL) $(INSTL_EXE_OPTS) $< $(BINDIR)/$<

src/bin/initdb/initdb.sh

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#
2727
#
2828
# IDENTIFICATION
29-
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.58 1999/03/17 22:53:25 momjian Exp $
29+
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.59 1999/05/12 10:35:43 wieck Exp $
3030
#
3131
#-------------------------------------------------------------------------
3232

@@ -491,6 +491,26 @@ echo "CREATE RULE \"_RETpg_indexes\" AS ON SELECT TO pg_indexes DO INSTEAD \
491491
AND I.oid = X.indexrelid;" | \
492492
postgres $PGSQL_OPT template1 > /dev/null
493493

494+
if [ -f $PGLIB/plpgsql__DLSUFFIX__ ] ; then
495+
echo "Installing PL/pgSQL as trusted procedural language"
496+
echo "CREATE FUNCTION plpgsql_call_handler () RETURNS opaque \
497+
AS '$PGLIB/plpgsql__DLSUFFIX__' LANGUAGE 'C';" | \
498+
postgres $PGSQL_OPT template1 > /dev/null
499+
echo "CREATE TRUSTED PROCEDURAL LANGUAGE 'plpgsql' \
500+
HANDLER plpgsql_call_handler LANCOMPILER 'PL/pgSQL';" | \
501+
postgres $PGSQL_OPT template1 > /dev/null
502+
fi
503+
504+
if [ -f $PGLIB/pltcl__DLSUFFIX__ ] ; then
505+
echo "Installing PL/Tcl as trusted procedural language"
506+
echo "CREATE FUNCTION pltcl_call_handler () RETURNS opaque \
507+
AS '$PGLIB/pltcl__DLSUFFIX__' LANGUAGE 'C';" | \
508+
postgres $PGSQL_OPT template1 > /dev/null
509+
echo "CREATE TRUSTED PROCEDURAL LANGUAGE 'pltcl' \
510+
HANDLER pltcl_call_handler LANCOMPILER 'PL/Tcl';" | \
511+
postgres $PGSQL_OPT template1 > /dev/null
512+
fi
513+
494514
echo "Loading pg_description"
495515
echo "copy pg_description from '$TEMPLATE_DESCR'" | \
496516
postgres $PGSQL_OPT template1 > /dev/null

src/test/regress/sql/tests

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,5 @@ alter_table
6666
portals_p2
6767
rules
6868
limit
69-
install_plpgsql
7069
plpgsql
7170
temp

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy