Re: PL/pgSQL 1.2
От | Marko Tiikkaja |
---|---|
Тема | Re: PL/pgSQL 1.2 |
Дата | |
Msg-id | 540B3406.8070905@joh.to обсуждение исходный текст |
Ответ на | Re: PL/pgSQL 1.2 (Jan Wieck <jan@wi3ck.info>) |
Список | 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 по дате отправления: