postgres/perl, autocommit and BEGIN; COMMIT;

Fraser Campbell fraser-eicrhRFjby5dCsDujFhwbypxlwaOVQ5f at public.gmane.org
Mon May 31 13:45:06 UTC 2004


On Monday 31 May 2004 08:23, cbbrowne-HInyCGIudOg at public.gmane.org wrote:

> There are two usual approaches for dealing with invalid input:
>
>  1.  Throw an error back to the application, or
>  2.  Take a wild guess at some alternative value, and use it instead.
>
> If you want data integrity of your database, 1. is the right answer.
> MySQL does 2.

I had always thought the answer was:

3. Never accept invalid input.

If invalid input ever touches your db layer then your software has a large 
bug.

One of the main drawbacks that I found with mysql is that it doesn't support 
subselects, I found myself wanting that even on a relatively simple 
website ... it was easy enough to work around but still the subselect would 
have (probably) been more efficient (definitely from a code point of view).

I don't use postgresql because I've seen it eat ram and eat disk space.  I 
hear it may now do an automatic "VACUUM" (whatever that means) so perhaps the 
disappearing disk issue is solved.  I've used mysql since 1998 and have only 
had one case of corruption, that was due to a corrupt disk.

In future projects I may chose postgresql but more from licensing concerns 
than technical ones (I expect).  I'll probably also give something like 
sqlite a go, it's not like I'm trying to run a gun registry ;-)

-- 
Fraser Campbell <fraser-Txk5XLRqZ6CsTnJN9+BGXg at public.gmane.org>                 http://www.wehave.net/
Georgetown, Ontario, Canada                               Debian GNU/Linux
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list