1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-26 01:22:12 +03:00

Add support for anonymous code blocks (DO blocks) to PL/Perl.

Joshua Tolley, reviewed by Brendan Jurd and Tim Bunce
This commit is contained in:
Tom Lane
2009-11-29 03:02:27 +00:00
parent 8217cfbd99
commit 42b2907d12
6 changed files with 172 additions and 22 deletions

View File

@ -361,3 +361,11 @@ CREATE OR REPLACE FUNCTION perl_spi_prepared_bad(double precision) RETURNS doubl
$$ LANGUAGE plperl;
SELECT perl_spi_prepared_bad(4.35) as "double precision";
-- simple test of a DO block
DO $$
$a = 'This is a test';
elog(NOTICE, $a);
$$ LANGUAGE plperl;
-- check that restricted operations are rejected in a plperl DO block
DO $$ use Config; $$ LANGUAGE plperl;