Hi all I'm new in this mailing list. My job was/is to setup a mailserver with postfix and a database backend. One of the condition is to use Firebird as DBMS, so i decided to write another backend for dbmail.
If you not know Firebird, it's a open source database ported from Interbase, wich supports a lot of things (domains, tables, triggers, generators, udfs, roles, transactions, ...). For further informations have a look at http://www.firebirdsql.org The main problem is, that Firebird's API not supports db_num_rows(), respectively only rows affected on INSERT, UPDATE and DELETE (not on SELECT). For this reason i correct all files, which contains db_num_rows() with db_fetch_row() statements. I've translated almost all files expect dbmsgbuf.c. Most queries could be modified with statements like that: while ((row = db_fecth_row()) == 0) { ... } or: row = db_fetch_row(); if (row == -1) { ...error/information } while (row == 0) { ... row = db_fetch_row(); } The function 'db_fetch_row' would fetch a record from database and returns 0 if there was a record or -1 if there was no record (EOF). MySQL also would support it with mysql_fetch_row. For PgSQL I'm not shure. I think this change would make sense, first of all to improve the performance. I hope a alternative db backend would be welcome. What do you think about this idea? Thanks for your answers. Dominik Fässler
