Introducing PL/Python

If you don't happen to be a Perl expert, PL/Python might be the right thing for you. Python has been part of the PostgreSQL infrastructure for a long time and is therefore a solid, well- tested implementation.

When it comes to PL/Python, there is one thing you have to keep in mind: PL/Python is only available as an untrusted language. From a security point of view, it is important to keep that in mind at all times.

To enable PL/Python, you can run the following line from your command line. test is the name of the database you want to use with PL/Python:

createlang plpythonu test 

Once the language is enabled, it is possible to write code.

Alternatively, you can use a CREATE LANGUAGE clause, of course. Also keep in mind that in order to use server-side languages, PostgreSQL packages containing those languages are needed (postgresql-plpython-$(VERSIONNUMBER) and so on).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset