Re: where to divide application and database

From: Sam Mason <sam(at)samason(dot)me(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: where to divide application and database
Date: 2009-02-20 20:45:20
Message-ID: 20090220204520.GG32672@frubble.xen.chris-lamb.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Feb 20, 2009 at 04:51:33PM +0100, Ivan Sergio Borgonovo wrote:
> What I find a bit annoying is politely deal with the error once it
> is reported back to the application *and* connection and *bandwidth*
> costs of moving clearly wrong data back and forward.

This sounds a bit like premature optimization to me; I don't think many
people worry about optimizing the failure code paths. I know I prefer
to make sure that things go quickly when they're working. If you're
worried about someone performing a DOS attack on a failure then you'd
want to optimize it, but surely you'd want the checks early in the
application code.

> If you've a good mapping between pg types and the application
> language/library types it becomes easier to keep in sync those
> checks otherwise it is a really boring job and DB checks becomes just
> one more security net to maintain.

It does, but constraints like that aren't going to be changing to
regularly are they?

--
Sam http://samason.me.uk/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Angelo Astorga 2009-02-20 20:51:23 Compatibilidad RH enterprise 5.3 !!!
Previous Message Sam Mason 2009-02-20 20:38:25 Re: where to divide application and database