Re: Message-ID as unique key? - Mailing list pgsql-general

From Csaba Nagy
Subject Re: Message-ID as unique key?
Date
Msg-id 1097593905.3003.12.camel@localhost.localdomain
Whole thread Raw
In response to Message-ID as unique key?  (Jerry LeVan <jerry.levan@eku.edu>)
Responses Re: Message-ID as unique key?  (Csaba Nagy <nagy@ecircle-ag.com>)
Re: Message-ID as unique key?  (Greg Stark <gsstark@mit.edu>)
List pgsql-general
No, it's not a global unique identifier. In fact you cannot even be sure
it will always be there in all mails, depending on your mail processing
chain. Most of the email clients will add one, and most of the mail
transfer agents will also add one if missing, but there's no general
rule of how to create the mail id. Usually it will be unique for the
specific instance of the user/transfer agent which generates it, as it
serves for exact this purpose, to identify the mail instance on the
agent instance, but nothing more.
So: don't use it as a unique identifier.

Cheers,
Csaba.

On Tue, 2004-10-12 at 17:01, Jerry LeVan wrote:
> Hi,
> I am futzing around with Andrew Stuarts "Catchmail" program
> that stores emails into a postgresql database.
>
> I want to avoid inserting the same email more than once...
> (pieces of the email actually get emplaced into several
>   tables).
>
> Is the "Message-ID"  header field a globally unique identifer?
>
> I eventually want to have a cron job process my inbox and don't
> want successive cron tasks to keep re-entering the same email :)
>
> Jerry
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
>       subscribe-nomail command to majordomo@postgresql.org so that your
>       message can get through to the mailing list cleanly


pgsql-general by date:

Previous
From: Dennis Gearon
Date:
Subject: connection or query affected
Next
From: Gaetano Mendola
Date:
Subject: Re: Change query priority