Re: [Postfixadmin-devel] Adding arbitrary field to mailbox table
Brought to you by:
christian_boltz,
gingerdog
From: Christian B. <pos...@cb...> - 2011-04-08 18:22:07
|
Hello, Am Freitag, 8. April 2011 schrieb Tanstaafl: > On 2011-04-07 6:40 PM, David Goodwin wrote: > > People keep asking for additional fields, but I'm not really sure > > it's something we can ever support in a flexible enough way to > > satisfy anyone. I think we can make it very flexible - guess why I want to use arrays like in fetchmail.php everywhere ;-) (and send me some free time if you have too much *g* so that I can get it done) > > I'm happy to have a rule that fields starting with x_ are > > 'reserved' for local site customisations. We should include a note > > in one of the files in svn to make it official. > > Why not just add one special table for *all* special fields? Because it makes things more difficult: - you have to JOIN two tables in SELECT queries (which will become a pain at least for listing mailboxes - it already has an interesting[tm] query) - you have to write to two tables in INSERT, UPDATE and DELETE - things will become really funny if you want to extend more than one table Trust me: you (usually) don't want that ;-) However, you brought up a good point and I'll add another rule: If you want to create an additional table, use a name starting with "x_". Within that table, you can use any field and index names you want, and may also create unique keys. If you use PostgreSQL, names for indexes and unique keys must start with "x_". Avoid foreign keys to PostfixAdmin's default tables if possible. Regards, Christian Boltz -- [CR/LF] Beides sind uralte Begriffe, die noch aus der Zeit der Schreibmaschinen stammen (das sind so komische Geräte mit denen man Buchstaben und Zahlen auf Papier bekam, ohne das ein Computer und ein Drucker dazwischen hing:-))). [Nico Jochens in suse-linux] |