Re: INSERT ON DUPLICATE KEY UPDATE - Mailing list pgsql-general

From Eduardo Pérez Ureta
Subject Re: INSERT ON DUPLICATE KEY UPDATE
Date
Msg-id 20040618203621.GA8023@localhost.localdomain
Whole thread Raw
In response to Re: INSERT ON DUPLICATE KEY UPDATE  (Richard Huxton <dev@archonet.com>)
Responses Re: INSERT ON DUPLICATE KEY UPDATE  (Karsten Hilbert <Karsten.Hilbert@gmx.net>)
List pgsql-general
On 2004-06-18 18:02:18 UTC, Richard Huxton wrote:
> Out of curiosity, why don't you know whether you're inserting or
> updating? It always worries me when I don't know what my application is
> doing.

This is the example:

I'm downloading a list of products from the web and they already have a
product_id (that's the primary key), in my table I have many fields that
I use myself like comments, stock, ... But when downloading the list I
only have the product_id, the product name, the price and the remote
stock. So I must insert data like the remote stock without removing any
of my data and leaving all the other columns unmodified.

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: PgSQL shut down
Next
From: Jeff Rogers
Date:
Subject: Re: can't win