in reply to Environments extended with embeded Perl: are they for real?

Perl in PostgreSQL is designed to allow you access to perl functions directly from SQL. While the SQL still looks like SQL, you can implement the function in Perl instead of say, PL/pgSQL. If you're smart about not crossing the RDBMS/DBI line too many times then this can be a definite boon - if you're not up on all the costs associated with moving things between your RDBMS and your external language then it may not look like its worth much.

For myself, I've never tried the perl extension because PL/pgSQL comes pre-built and I can get my work done with that.

  • Comment on Re: Environments extended with embeded Perl: are they for real?

Replies are listed 'Best First'.
Re: Re: Environments extended with embeded Perl: are they for real?
by zby (Vicar) on Mar 24, 2003 at 10:39 UTC
    I have tried the PostgreSQL perl extension. It is quite nifty for small tasks like some text transformations (where Perl is really great while PL style languages are a bit primitive), but the connectivity to the whole data is a bit restricted. PL/pgSQL can access all the tables in a quite natural manner - by name, Perl subroutines currently can act only as mathematical functions - transforming the parameters into the return value, they have not access to the database tables. This should change since there is an iniciative to build a DBD style library for plperl, but it seems that it still will not be as natural as for a PL style language. Another restriction is that perl subroutines cannot call PL/pgSQL.