Re: where to divide application and database - Mailing list pgsql-general

From Sam Mason
Subject Re: where to divide application and database
Date
Msg-id 20090220204520.GG32672@frubble.xen.chris-lamb.co.uk
Whole thread Raw
In response to Re: where to divide application and database  (Ivan Sergio Borgonovo <mail@webthatworks.it>)
Responses Re: where to divide application and database
List 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/

pgsql-general by date:

Previous
From: Sam Mason
Date:
Subject: Re: where to divide application and database
Next
From: Angelo Astorga
Date:
Subject: Compatibilidad RH enterprise 5.3 !!!