Hello,

> CREATE SEQUENCE alias_idnr_seq;
> CREATE TABLE aliases (
>     alias_idnr INT8 DEFAULT nextval('alias_idnr_seq'),
>     ...
> ->    deliver_to VARCHAR(250) REFERENCE users(user_idnr),
>     ...
>     PRIMARY KEY (alias_idnr)
> );


  This would break all non-INBOX deliveries.


> CREATE TABLE mailboxes (
>    mailbox_idnr INT8 DEFAULT nextval('mailbox_idnr_seq'),
> 
> ->   owner_idnr INT8 REFERENCE users(user_idnr),
>       ....
> }

  This may have implications with shared folders, but those
aren't implimented just yet either, so...


> CREATE TABLE messages (
>    message_idnr INT8 DEFAULT nextval('message_idnr_seq'),
> 
> ->   mailbox_idnr INT8 REFERENCE mailboxes(mailbox_idnr),
>       ...
> }

  I've not looked at Aaron's recent filtering patch, but this
may have reprecussions there - I think at one time there was
a possibility of setting mailbox_idnr to 0 for pre-filtered
messages, and updating later.

  Another note: along with all the foreign keys, which are
a good idea where appropriate/possible, quite a few of the
indexes that have appeared on the list can be dropped.  A
primary key already gives you a unique index on the column,
and a foreign key gives you an index (non-unique) as well.



--
Jesse Norell
jesse (at) kci.net


Reply via email to