Re: PL/pgSQL 1.2 - Mailing list pgsql-hackers

From Marko Tiikkaja
Subject Re: PL/pgSQL 1.2
Date
Msg-id 540B3406.8070905@joh.to
Whole thread Raw
In response to Re: PL/pgSQL 1.2  (Jan Wieck <jan@wi3ck.info>)
List pgsql-hackers
On 2014-09-06 6:12 PM, Jan Wieck wrote:
> 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.

Foolproofing is just one thing that's good about this solution.  The 
other one would be that the application *doesn't need to know* what's 
going on behind the scenes.  The app deals with a consistent API, and we 
make that API happen with PL/PgSQL.

> Guess what, the second you made something foolproof, evolution will
> create a dumber fool. This is a race you cannot win.

You're completely missing the point.


.marko



pgsql-hackers by date:

Previous
From: Marko Tiikkaja
Date:
Subject: Re: PL/pgSQL 2
Next
From: Jan Wieck
Date:
Subject: Re: PL/pgSQL 2