On 09/06/2014 04:21 AM, Marko Tiikkaja wrote:
> We wrap these things into (sometimes) simple-looking function so that
> none of the application developers ever run any SQL. We define an
> interface between the application and the database, and that interface
> is implemented using PL/PgSQL functions. Sure, sometimes one function
> will just fire off a single UPDATE .. RETURNING, or a SELECT, but that
> doesn't matter. The trick is to be consistent everywhere.
There is precisely your root problem. Instead of educating your
application developers on how to properly use a relational database
system, you try to make it foolproof.
Guess what, the second you made something foolproof, evolution will
create a dumber fool. This is a race you cannot win.
Regards,
Jan
--
Jan Wieck
Senior Software Engineer
http://slony.info