Replaceing records

From: Alex <alex(at)meerkatsoft(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Replaceing records
Date: 2003-09-04 08:00:23
Message-ID: 3F56F117.3080006@meerkatsoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,
MySQL has a nice feature that allows to call a replace rather insert
which will attempt to insert if record not present and replace if it does.

Is there any similar feature ?

Currently I run a select prior to any insert and then update or insert
depending on the result of the select. The problem here is that I just
doubled the queries. Doing so on a table with 5Mio rows and on 100k
inserts will take time and I would like to have an efficient way of
doing it.

Any ideas ?
Thanks
Alex

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andreas Muck 2003-09-04 08:13:09 Re: More than 1024 connections from the same c-backend
Previous Message Andreas Muck 2003-09-04 07:58:35 More than 1024 connections from the same c-backend