Thread: [Postfixadmin-devel] Adding arbitrary field to mailbox table
Brought to you by:
christian_boltz,
gingerdog
From: Luigi R. <li...@lu...> - 2011-04-06 09:03:24
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I wish to add a couple of fields to mailbox table for administrative purposes. Is there a correct way to select the names of the fields in order not to break the database structure update process? Thank you in advance. Ciao, luigi - -- / +--[Luigi Rosa]-- \ Immanuel Kant but Kubla Khan. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2cKBsACgkQ3kWu7Tfl6ZTSgACgnW1kH9srctUfgMSBrtqh790Y OkQAn0j4iRTcHIhEum+6J0/BG05w2Bbz =EkDh -----END PGP SIGNATURE----- |
From: Christian B. <pos...@cb...> - 2011-04-07 22:32:13
|
Hello, Am Mittwoch, 6. April 2011 schrieb Luigi Rosa: > I wish to add a couple of fields to mailbox table for administrative > purposes. > > Is there a correct way to select the names of the fields in order not > to break the database structure update process? We don't have a policy on this - at least until now. I guess we should define one... Just as idea: (I'm open to feedback and/or better ideas ;-) - you can use any fieldname starting with "x_" - you can create indexes if needed (also prefix them with x_ (or tablename_x_ for PostgreSQL) - avoid creating unique indexes and foreign keys if possible (they could make scheme changes difficult) Would that be OK for you? @David: what do you think? Regards, Christian Boltz -- > The issue here is the one of disk space... How do you know before hand > there is enough disk space in /boot and /lib? Err, ask Mr. Filesystem and, given your hd has turned ROM because it's full, fail gracefully? [> Marcus Meissner and Wolfgang Woehl in opensuse-factory] |
From: Luigi R. <li...@lu...> - 2011-04-08 04:07:08
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Christian Boltz said the following on 08/04/11 00:32: > - you can use any fieldname starting with "x_" That's exactly what I was thinking about and would be perfect. Thank you all! Ciao, luigi - -- / +--[Luigi Rosa]-- \ The cinema is little more than a fad. It's canned drama. What audiences really want to see is flesh and blood on the stage. --Charlie Chaplin, 1916 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2eidwACgkQ3kWu7Tfl6ZQTZQCdGF2+6vW7u45mv7rd0C051F/D 9nMAnRhTvS0J5uTV8PtA36j7ZAkc8Ae1 =bFUm -----END PGP SIGNATURE----- |
From: David G. <da...@co...> - 2011-04-07 22:41:30
|
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'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. David. David Goodwin Pale Purple Ltd. http://www.palepurple.co.uk 0845 0046746 07792 380669 On 7 Apr 2011, at 23:32, Christian Boltz <pos...@cb...> wrote: > Hello, > > Am Mittwoch, 6. April 2011 schrieb Luigi Rosa: >> I wish to add a couple of fields to mailbox table for administrative >> purposes. >> >> Is there a correct way to select the names of the fields in order not >> to break the database structure update process? > > We don't have a policy on this - at least until now. > I guess we should define one... > > Just as idea: (I'm open to feedback and/or better ideas ;-) > - you can use any fieldname starting with "x_" > - you can create indexes if needed (also prefix them with x_ (or > tablename_x_ for PostgreSQL) > - avoid creating unique indexes and foreign keys if possible (they could > make scheme changes difficult) > > Would that be OK for you? > > @David: what do you think? > > > Regards, > > Christian Boltz > -- >> The issue here is the one of disk space... How do you know before hand >> there is enough disk space in /boot and /lib? > Err, ask Mr. Filesystem and, given your hd has turned ROM because it's > full, fail gracefully? > [> Marcus Meissner and Wolfgang Woehl in opensuse-factory] > > ------------------------------------------------------------------------------ > Xperia(TM) PLAY > It's a major breakthrough. An authentic gaming > smartphone on the nation's most reliable network. > And it wants your games. > http://p.sf.net/sfu/verizon-sfdev > _______________________________________________ > Postfixadmin-devel mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postfixadmin-devel |
From: Tanstaafl <tan...@li...> - 2011-04-08 12:13:30
|
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'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? |
From: Luigi R. <li...@lu...> - 2011-04-08 12:34:25
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Tanstaafl said the following on 08/04/11 14:13: > Why not just add one special table for *all* special fields? Back to square one: how should be called one or more special table like tis in order not to break compatibility and automatic structure upgrade? Ciao, luigi - -- / +--[Luigi Rosa]-- \ The last time somebody said, "I find I can write much better with a word processor.", I replied, "They used to say the same thing about drugs." --Roy Blount, Jr. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2fAMUACgkQ3kWu7Tfl6ZRhlgCfY2zRPhExxAhYvHYsD0C/QCFg 2eYAn10DHOsuf1vhLTc/zlHYsZeMyxth =miRh -----END PGP SIGNATURE----- |
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] |
From: Tanstaafl <tan...@li...> - 2011-04-09 15:14:20
|
On 4/8/2011 2:21 PM, Christian Boltz wrote: > Am Freitag, 8. April 2011 schrieb Tanstaafl: >> 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 ;-) I'd be happy to just take your word for it... but thanks also for the explanation as to why... :) |