head	1.4;
access;
symbols
	REL9_0_0:1.4
	REL9_1_ALPHA1:1.4
	REL9_0_RC1:1.4
	REL9_0_BETA4:1.4
	REL9_0_STABLE:1.4.0.14
	REL9_0_BETA3:1.4
	REL9_0_BETA2:1.4
	REL7_4_29:1.3
	REL8_0_25:1.3
	REL8_1_21:1.3
	REL8_2_17:1.3
	REL8_3_11:1.3
	REL8_4_4:1.4
	REL9_0_BETA1:1.4
	REL9_0_ALPHA5_BRANCH:1.4.0.12
	REL9_0_ALPHA5:1.4
	REL7_4_28:1.3
	REL8_0_24:1.3
	REL8_1_20:1.3
	REL8_2_16:1.3
	REL8_3_10:1.3
	REL8_4_3:1.4
	REL9_0_ALPHA4:1.4
	REL9_0_ALPHA4_BRANCH:1.4.0.10
	REL8_5_ALPHA3:1.4
	REL8_5_ALPHA3_BRANCH:1.4.0.8
	REL7_4_27:1.3
	REL8_0_23:1.3
	REL8_1_19:1.3
	REL8_2_15:1.3
	REL8_3_9:1.3
	REL8_4_2:1.4
	REL8_5_ALPHA2:1.4
	REL8_5_ALPHA2_BRANCH:1.4.0.6
	REL7_4_26:1.3
	REL8_0_22:1.3
	REL8_1_18:1.3
	REL8_2_14:1.3
	REL8_3_8:1.3
	REL8_4_1:1.4
	REL8_5_ALPHA1:1.4
	REL8_5_ALPHA1_BRANCH:1.4.0.4
	REL8_4_STABLE:1.4.0.2
	REL8_4_0:1.4
	REL8_4_RC2:1.4
	REL8_4_RC1:1.4
	REL8_4_BETA2:1.4
	REL8_4_BETA1:1.4
	REL7_4_25:1.3
	REL8_0_21:1.3
	REL8_1_17:1.3
	REL8_2_13:1.3
	REL8_3_7:1.3
	REL7_4_24:1.3
	REL8_0_20:1.3
	REL8_1_16:1.3
	REL8_2_12:1.3
	REL8_3_6:1.3
	REL7_4_23:1.3
	REL8_0_19:1.3
	REL8_1_15:1.3
	REL8_2_11:1.3
	REL8_3_5:1.3
	REL7_4_22:1.3
	REL8_0_18:1.3
	REL8_1_14:1.3
	REL8_2_10:1.3
	REL8_3_4:1.3
	REL7_4_21:1.3
	REL8_0_17:1.3
	REL8_1_13:1.3
	REL8_2_9:1.3
	REL8_3_3:1.3
	REL7_4_20:1.3
	REL8_0_16:1.3
	REL8_1_12:1.3
	REL8_2_8:1.3
	REL8_3_2:1.3
	REL8_2_7:1.3
	REL8_3_1:1.3
	REL8_3_STABLE:1.3.0.20
	REL8_3_0:1.3
	REL8_3_RC2:1.3
	REL7_3_21:1.3
	REL7_4_19:1.3
	REL8_0_15:1.3
	REL8_1_11:1.3
	REL8_2_6:1.3
	REL8_3_RC1:1.3
	REL8_3_BETA4:1.3
	REL8_3_BETA3:1.3
	REL8_3_BETA2:1.3
	REL8_3_BETA1:1.3
	REL7_3_20:1.3
	REL7_4_18:1.3
	REL8_0_14:1.3
	REL8_1_10:1.3
	REL8_2_5:1.3
	REL7_3_19:1.3
	REL7_4_17:1.3
	REL8_0_13:1.3
	REL8_1_9:1.3
	REL8_2_4:1.3
	REL8_0_12:1.3
	REL8_1_8:1.3
	REL8_2_3:1.3
	REL7_3_18:1.3
	REL7_4_16:1.3
	REL8_0_11:1.3
	REL8_1_7:1.3
	REL8_2_2:1.3
	REL8_0_10:1.3
	REL8_1_6:1.3
	REL8_2_1:1.3
	REL7_4_15:1.3
	REL7_3_17:1.3
	REL8_2_STABLE:1.3.0.18
	REL8_2_0:1.3
	REL8_2_RC1:1.3
	REL8_2_BETA3:1.3
	REL8_2_BETA2:1.3
	REL8_1_5:1.3
	REL8_0_9:1.3
	REL7_4_14:1.3
	REL7_3_16:1.3
	REL8_2_BETA1:1.3
	REL7_3_15:1.3
	REL7_4_13:1.3
	REL8_0_8:1.3
	REL8_1_4:1.3
	REL7_3_14:1.3
	REL7_4_12:1.3
	REL8_0_7:1.3
	REL8_1_3:1.3
	REL7_3_13:1.3
	REL7_4_11:1.3
	REL8_0_6:1.3
	REL8_1_2:1.3
	REL7_3_12:1.3
	REL7_4_10:1.3
	REL8_0_5:1.3
	REL8_1_1:1.3
	REL8_1_STABLE:1.3.0.16
	REL8_1_0:1.3
	REL8_1_0RC1:1.3
	REL8_1_0BETA4:1.3
	REL8_1_0BETA3:1.3
	REL7_3_11:1.3
	REL7_4_9:1.3
	REL8_0_4:1.3
	REL8_1_0BETA2:1.3
	REL8_1_0BETA1:1.3
	REL7_2_8:1.3
	REL7_3_10:1.3
	REL7_4_8:1.3
	REL8_0_3:1.3
	REL8_0_2:1.3
	REL7_2_7:1.3
	REL7_3_9:1.3
	REL7_4_7:1.3
	REL8_0_1:1.3
	REL8_0_STABLE:1.3.0.14
	REL8_0_0:1.3.0.12
	REL8_0_0RC5:1.3
	REL8_0_0RC4:1.3
	REL8_0_0RC3:1.3
	REL8_0_0RC2:1.3
	REL8_0_0RC1:1.3
	REL8_0_0BETA5:1.3
	REL8_0_0BETA4:1.3
	REL7_4_6:1.3
	REL7_3_8:1.3
	REL7_2_6:1.3
	REL8_0_0BETA3:1.3
	REL8_0_0BETA2:1.3
	REL7_2_5:1.3
	REL7_4_5:1.3
	REL7_3_7:1.3
	REL7_4_4:1.3
	REL8_0_0BETA1:1.3
	REL7_4_3:1.3
	REL7_4_2:1.3
	REL7_3_6:1.3
	REL7_4_1:1.3
	REL7_3_5:1.3
	REL7_4:1.3
	REL7_4_RC2:1.3
	REL7_4_STABLE:1.3.0.10
	REL7_4_RC1:1.3
	REL7_4_BETA5:1.3
	REL7_4_BETA4:1.3
	REL7_4_BETA3:1.3
	REL7_4_BETA2:1.3
	WIN32_DEV:1.3.0.8
	REL7_4_BETA1:1.3
	REL7_3_4:1.3
	REL7_3_2:1.3
	REL7_2_4:1.3
	REL7_3_STABLE:1.3.0.6
	REL7_2_3:1.3
	REL7_2_STABLE:1.3.0.4
	REL7_2:1.3
	REL7_2_RC2:1.3
	REL7_2_RC1:1.3
	REL7_2_BETA5:1.3
	REL7_2_BETA4:1.3
	REL7_2_BETA3:1.3
	REL7_2_BETA2:1.3
	REL7_2_BETA1:1.3
	REL7_1_2:1.3
	REL7_1_STABLE:1.3.0.2
	REL7_1_BETA:1.2
	REL7_1_BETA3:1.3
	REL7_1_BETA2:1.3
	REL7_1:1.3
	REL7_0_PATCHES:1.1.0.2
	REL7_0:1.1;
locks; strict;
comment	@# @;


1.4
date	2008.03.21.13.23.29;	author momjian;	state Exp;
branches;
next	1.3;

1.3
date	2000.12.19.18.16.26;	author petere;	state Exp;
branches;
next	1.2;

1.2
date	2000.10.24.17.47.32;	author tgl;	state Exp;
branches;
next	1.1;

1.1
date	2000.01.20.05.08.58;	author momjian;	state Exp;
branches;
next	;


desc
@@


1.4
log
@More README src cleanups.
@
text
@$PostgreSQL: pgsql/src/backend/access/gin/README,v 1.5 2008/03/20 17:55:14 momjian Exp $

PL/Perl allows you to write PostgreSQL functions and procedures in
Perl.  To include PL/Perl in the build use './configure --with-perl'.
To build from this directory use 'gmake all; gmake install'.  libperl
must have been built as a shared library, which is usually not the
case in standard installations.

Consult the PostgreSQL User's Guide and the INSTALL file in the
top-level directory of the source distribution for more information.
@


1.3
log
@Polish PL/Perl documentation.  The README file got shrunk to being a
pointer into the real documentation.
@
text
@d1 2
@


1.2
log
@Update plperl README per suggestions from Edward Bridges.
@
text
@d1 5
a5 1
README for PL/Perl                                          2000.10.24
d7 2
a8 50
PREREQUISITES
======================================================================
+ Perl must be built as a shared library.
+ when compiling Postgres, use the --with-perl option.  Alternatively,
  you can build plperl separately in an already-configured source tree:
  cd to $POSTGRES_SRC/src/pl/plperl/ and do "gmake all install".

CONFIGURING
======================================================================
+ as postgres super user:
  createlang plperl [database]

NOTES ON USAGE
======================================================================
+ Use q[], qq[], and qw[] instead of single quotes in 
  function definitions.
+ When using escape sequences, you must backslash your
  backslashes, e.g.
    $alphanum =~ s/\W//g;  # Wrong!  Will replace capital W's
    $alphanum =~ s/\\W//g; # Right!  Will replace non-word chars
+ Arguments to the function are available in @@_
+ If argument is declared as a tuple, then tuple is represented as a
  hash reference.

EXAMPLES
======================================================================
CREATE FUNCTION addints(int4, int4) RETURNS int4 AS '
return $_[0] + $_[1]
' LANGUAGE 'plperl';

SELECT addints(3,4);

-- of course, you can pass tuples;
CREATE TABLE twoints ( a integer, b integer);
CREATE FUNCTION addtwoints(twoints) RETURNS integer AS '
$tup = shift;
return $tup->{"a"} + $tup->{"b"};
' LANGUAGE 'plperl';

SELECT addtwoints(twoints) from twoints;

-- here is one that will fail. Creating the function
-- will work, but using it will fail.
CREATE FUNCTION badfunc() RETURNS int4 AS '
open(TEMP, ">/tmp/badfile");
print TEMP "Gotcha!\n";
return 1;
' LANGUAGE 'plperl';

SELECT badfunc();
@


1.1
log
@Well, I finally solved the linking problem
that kept me from making perl secure.

Attached is uuencoded tarball to add PL/perl
to postgresql.

Things I know don't work.
-- triggers
-- SPI


The README file has a _VERY_ short tutorial.

Mark Hollomon
@
text
@d1 1
a1 2
>perl Makefile.pl
>make
d3 23
a25 3
copy the resulting library somewhere that
the postgresql backend can see it. assume
that path is /usr/local/pgsql/modules/plperl.so
d27 2
a28 8
CREATE FUNCTION plperl_call_handler() RETURNS opaque
AS '/usr/local/pgsql/modules/plperl.so' LANGUAGE 'C';

CREATE TRUSTED PROCEDURAL LANGUAGE 'plperl'
HANDLER plperl_call_handler
LANCOMPILER 'PL/Perl';

-- here is simple example
a52 2


@
