3 ms·
One thing that PostgreSQL can do that mysql cannot (so far as I know) is lets you define your own triggers and even your own data types. In pretty much whatever
by olefoo 17y ago
One thing that PostgreSQL can do that mysql cannot (so far as I know) is lets you define your own triggers and even your own data types. In pretty much whatever language you choose.
PL/Ruby http://moulon.inra.fr/ruby/plruby.html http://moulon.inra.fr/ruby/plruby.html
for instance, could be used to define an insert trigger that would check the values being inserted into a table and perform arbitrary actions based on them; say, an alert if a user on a watchlist (another table in the db) changes certain values in their profile entry, for example.
It can lead to a fairly clean coding style where data consistency and manipulation code lives in the database.