Re: Duplicate key insert question

From: "Maksim Likharev" <mlikharev(at)aurigin(dot)com>
To: "Jean-Christian Imbeault" <jc(at)mega-bucks(dot)co(dot)jp>, "Dann Corbit" <DCorbit(at)connx(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Duplicate key insert question
Date: 2003-07-02 00:40:14
Message-ID: 56510AAEF435D240958D1CE8C6B1770A016D2D80@mailc03.aurigin.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Yes, but for MSSQL unique index with ignore duplicate in reality
will reject all duplicates.
Another word if you are trying to insert 2 identical values
you will insert none.
Do search using IF EXISTS SELECT ... or LEFT OUTER JOIN ... WHERE ... IS
NULL.
works pretty fast.

-----Original Message-----
From: Jean-Christian Imbeault [mailto:jc(at)mega-bucks(dot)co(dot)jp]
Sent: Tuesday, July 01, 2003 5:21 PM
To: Dann Corbit
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Duplicate key insert question

Dann Corbit wrote:
>
> SQL*Server has a nice feature for this.

Ok ... is there a way to achieve the same effect in postgres?

Thanks,

Jean-Christian Imbeault

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
message can get through to the mailing list cleanly

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Reuben D. Budiardja 2003-07-02 00:43:59 Re: Duplicate key insert question
Previous Message Dann Corbit 2003-07-02 00:29:45 Re: Duplicate key insert question