Installation of PL/pgSQL
-
1) Type 'make' to build the shared plpgsql object.
2) Type 'make install' to install the shared object in
the PostgreSQL library directory.
3) Declare the PL/pgSQL procedural language in your
- database by
-
- psql dbname <mklang.sql
+ database by running the createlang script:
- If the PostgreSQL library directory is different from
- /usr/local/pgsql/lib you must edit mklang.sql prior.
+ createlang plpgsql DBNAME
If you declare the language in the template1 database,
any subsequently created database will have PL/pgSQL
support installed automatically.
-
-
-
#
# Makefile for the plpgsql shared object
#
-# $Header: /cvsroot/pgsql/src/pl/plpgsql/src/Makefile,v 1.9 2000/10/23 21:44:03 petere Exp $
+# $Header: /cvsroot/pgsql/src/pl/plpgsql/src/Makefile,v 1.10 2001/02/09 01:05:42 tgl Exp $
#
#-------------------------------------------------------------------------
distprep: $(srcdir)/pl_scan.c $(srcdir)/pl.tab.h $(srcdir)/pl_gram.c
-mklang.sql: mklang.sql.in
- sed -e 's%__libdir__%$(libdir)%g' -e 's%__DLSUFFIX__%$(DLSUFFIX)%g' < $< > $@
-
-
clean distclean: clean-lib
- rm -f $(OBJS) mklang.sql
+ rm -f $(OBJS)
@rm -f y.tab.c y.tab.h lex.yy.c
maintainer-clean: clean
+++ /dev/null
---
--- PL/pgSQL language declaration
---
--- $Header: /cvsroot/pgsql/src/pl/plpgsql/src/Attic/mklang.sql.in,v 1.5 2000/06/20 16:40:10 petere Exp $
---
-
-create function plpgsql_call_handler() returns opaque
- as '__libdir__/plpgsql__DLSUFFIX__'
- language 'C';
-
-create trusted procedural language 'plpgsql'
- handler plpgsql_call_handler
- lancompiler 'PL/pgSQL';