address_fields joins messages and addresses. Whenever an address is used in a message, an addresses row is created or used, and an address_fields row links the address to the message.
Searching for addresses used always involves this table.
We'll use this example to explain the other fields:
From: nirmala@example.org Subject: A Room on the Roof To: alice@example.com, bob@example.com
The part column records which MIME part contains this address field. It's usually empty. When a message is forwarded, the outer (forwarding) messsages's address fields have an empty part, while the inner (forwarded) messages's fields often are part 2.
The position column is used to sort the entire message header. From has position 1, To has position 3. (And subject has position 2, but that's stored in header_fields, not here.)
The field column refers to
field_names.
There is a field_names row for From
and one for
To
.
The number column is used to order fields that contain several addresses. The rows for Nirmala and Alice both have number 1 since their addresses are the first in their respective fields, while the address_fields row for Bob has number 2.
create table address_fields ( -- Grant: select, insert message integer not null, part text not null, position integer not null, field integer not null, number integer, address integer not null references addresses(id), foreign key (message, part) references part_numbers(message, part) on delete cascade );
The address_fields table was introduced in version 0.93.
In case of questions, please write to info@aox.org.
Last modified: 2010-11-19
Location: aox.org/db/address_fields