Hi Sumbry][,

> > Btw: PostgreSQL doesn't support the full syntax too but supports all
> >      features.
> >
> > There are still features missing but who cares if we don't need them?
> 
> This is a pet peeve - How do you know that you don't need
> something if you don't know that you know that you don't need it? (wtf did
> i just type?!?)  Haha, basically I'm trying to say that 99 percent of the
> MySQL apps out there today would be fine w/a little file based SQLite db.
> All they really needed was an easy, fast, and cheap way to access + store
> data - the overheard of a database for what most of these apps do is
> overkill.

Yes I agree but that has nothing to do with dbmail, right?

Lot of applications are quite ugly because they were developed for MySQL
and the developer didn't know what a real database can do.
Ilja for example said that he prefers PostgreSQL - so we can assume he
knows what a SQL database can do.

> But it drives me up the wall when I see developers implementing things in
> their code that would fit perfectly in the db.  Take
> our own db.c... there's pages and pages of SQL queries in there - but if
> we weren't supporting MySQL we could just pull all that crap out and store
> it in table views where we totally hide all the complexity of the db
> layout w/something as simple as SELECT from,to,subject,body,date FROM
> dbmail_mailboxview;

The dbmail schema is not too complex so I don't think that's necessary -
and it would only help for SELECTs.
Views are great if several applications have to query the database.

> Or how about all our quota functions?  In Postgres we could write our own
> plpsql function and rule/trigger that would automatically recalculate the
> quota for a mailbox on INSERT,UPDATE,DELETE and we could dump all the C
> code and just let the db deal with it.  If you enforce something like that
> at the db level, you'd never need to compute quotas nightly - they'd
> *always be correct*.

Yes you're right, a trigger would be nice. But we can achieve 'always
correct' by using transactions too. Probably there are only two
queries where the quota has to be modified? When a message is inserted
and when it's deleted.

> I'm only trying to illustrate a point - there's things we could be doing
> w/a postgres only backed dbmail that would blow us all away.. but

That would simplify the code somewhat, but it wouldn't really improve
dbmail I think? dbmail won't be faster, safer, get more features or
anything else by dropping MySQL support (if we require MySQL InnoDB
tables).

> if we did that we'd be the only ones using it.  You don't gain more
> users by ignorining the biggest kid on the block.


Thomas
-- 
http://www.tmueller.com for pgp key (95702B3B)

Reply via email to