Python integration in Postgresql

A session at DevconTLV

One of the exciting features of the Postgresql open source database engine is the ability to write stored procedures or functions in Python. Integrating python code directly into the database gives the database engine unprecedented power. For example, a function can check the server's file system to see if a file exists. This can be done on a database trigger, when a field containing a file name is added or updated, it can give the user an error if the file doesn't exist. A delete trigger can call python code to check references and delete a file from the file system if it is no longer needed. Other examples include: sending emails, FTPing files, processing data in a simpler manner then is possible using extended SQL syntax typically used in database functions.

There are tremendous advantages in writing database functions directly in Python. The ability increases the power of the database so that it is not tied down to strictly data access. In certain circumstances, it can be used as an application server, by putting your business logic inside database functions. This has to be managed correctly so that MVC principles are adhered to.

In my 45 minute talk, I will:
explain the concept of using a high level programming language integrated in the database layer.
show examples of the power it affords database programmers
show examples of using postgresql with python as an application server
show examples of abusing the power and how it should not be used.

About the speaker

This person is speaking at this event.
Sim Zacks


Coverage of this session

Sign in to add slides, notes or videos to this session


Israel Israel, Tel Aviv

14th February 2013

Tell your friends!


Date Thu 14th February 2013

Short URL


Official session page


View the schedule


See something wrong?

Report an issue with this session