Skip site navigation (1) Skip section navigation (2)

Re: Another small pl/perl patch

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Greg Sabino Mullane <greg(at)turnstep(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Another small pl/perl patch
Date: 2005-10-24 13:51:39
Message-ID: 435CE6EB.3000801@dunslane.net (view raw or flat)
Thread:
Lists: pgsql-patches
Well, I personally almost always use indirect file handles rather than 
globals. But I don't know that using globals file handles (which is what 
I gather you are objecting to) is deprecated, is it? The perl docs are 
absolutely littered with examples.

(I also use BSD style intentation consistently across my C, perl and 
Java ... which is unusual at least in the latter 2 cases but works well 
for me ;-) )

I don't mind applying this patch, if other people think it matters more 
than I do.

cheers

andrew

Greg Sabino Mullane wrote:

>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>
>Another quick little patch to clean up the docs. If we are going
>to provide examples of perl code, no matter how trivial, we might
>as well provide well-written perl code. :)
>
>- --
>Greg Sabino Mullane greg(at)turnstep(dot)com
>PGP Key: 0x14964AC8 200510231745
>http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
>
>Index: plperl.sgml
>===================================================================
>RCS file: /projects/cvsroot/pgsql/doc/src/sgml/plperl.sgml,v
>retrieving revision 2.47
>diff -c -r2.47 plperl.sgml
>*** plperl.sgml 18 Oct 2005 22:53:54 -0000      2.47
>- --- plperl.sgml 23 Oct 2005 21:44:00 -0000
>***************
>*** 554,561 ****
>     system operations are not allowed for security reasons:
>  <programlisting>
>  CREATE FUNCTION badfunc() RETURNS integer AS $$
>!     open(TEMP, "&gt;/tmp/badfile");
>!     print TEMP "Gotcha!\n";
>      return 1;
>  $$ LANGUAGE plperl;
>  </programlisting>
>- --- 554,564 ----
>     system operations are not allowed for security reasons:
>  <programlisting>
>  CREATE FUNCTION badfunc() RETURNS integer AS $$
>!     my $tmpfile = "/tmp/badfile";
>!     open my $fh, '&gt;', $tmpfile
>!         or elog(ERROR, qq{Could not open the file "$tmpfile": $!});
>!     print $fh "Testing writing to a file\n";
>!     close $fh or elog(ERROR, qq{Could not close the file "$tmpfile": $!});
>      return 1;
>  $$ LANGUAGE plperl;
>  </programlisting>
>
>-----BEGIN PGP SIGNATURE-----
>
>iD8DBQFDXATPvJuQZxSWSsgRAsWQAJ9hKI+mIJmRhUuqC+kVM73P78ZjxACfejgE
>ESnpPV0+8hs4DDbXVE60YcE=
>=zLS9
>-----END PGP SIGNATURE-----
>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 9: In versions below 8.0, the planner will ignore your desire to
>       choose an index scan if your joining column's datatypes do not
>       match
>
>  
>

In response to

Responses

pgsql-patches by date

Next:From: Greg Sabino MullaneDate: 2005-10-24 15:06:48
Subject: Re: Another small pl/perl patch
Previous:From: Neil ConwayDate: 2005-10-24 08:06:11
Subject: Re: TODO item - tid <> operator

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group