Mailing List Archive

Problem with data structure ...
Folks,

I had a problem with my data structure.
Basically I had unique user_idnr values but non-unique userid values.
This led to strange problems (mails disappearing all of a sudden and so
forth).
Maybe userid should be unique.

We are using dbmail 1.2


dbmail=# \d users
Table "public.users"
Column | Type |
Modifiers
-----------------+-----------------------------+-------------------------------------------------
user_idnr | bigint | not null default
nextval('user_idnr_seq'::text)
userid | character varying(100) | not null
passwd | character varying(34) | not null
client_idnr | bigint | not null default '0'
maxmail_size | bigint | not null default '0'
encryption_type | character varying(20) | not null default ''
last_login | timestamp without time zone | not null default
'1979-11-03 22:05:58'
Indexes: users_pkey primary key btree (user_idnr),
users_id_idx unique btree (user_idnr),
users_name_idx btree (userid)

Cheers,

Hans
Re: Problem with data structure ... [ In reply to ]
Hi

Hans-Jürgen Schönig wrote:

> Folks,
>
> I had a problem with my data structure.
> Basically I had unique user_idnr values but non-unique userid values.
> This led to strange problems (mails disappearing all of a sudden and so
> forth).
> Maybe userid should be unique.
It probably should be. I just checked it.. It is unique in the MySQL
tables for 2.0, but not for PostgreSQL...

I have corrected this in both 1.2.x (CVS) and 2.0

BTW, I've just released 1.2.4, where this is also corrected.

Ilja

>
> We are using dbmail 1.2
>
>
> dbmail=# \d users
> Table "public.users"
> Column | Type |
> Modifiers
> -----------------+-----------------------------+-------------------------------------------------
>
> user_idnr | bigint | not null default
> nextval('user_idnr_seq'::text)
> userid | character varying(100) | not null
> passwd | character varying(34) | not null
> client_idnr | bigint | not null default '0'
> maxmail_size | bigint | not null default '0'
> encryption_type | character varying(20) | not null default ''
> last_login | timestamp without time zone | not null default
> '1979-11-03 22:05:58'
> Indexes: users_pkey primary key btree (user_idnr),
> users_id_idx unique btree (user_idnr),
> users_name_idx btree (userid)
>
> Cheers,
>
> Hans
> _______________________________________________
> Dbmail-dev mailing list
> Dbmail-dev@dbmail.org
> http://twister.fastxs.net/mailman/listinfo/dbmail-dev