Re: insert on duplicate update?

From: Richard Huxton <dev(at)archonet(dot)com>
To: Peter Filipov <pfilipov(at)netissat(dot)bg>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: insert on duplicate update?
Date: 2005-11-09 12:28:13
Message-ID: 4371EB5D.5010706@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Peter Filipov wrote:
> hi,
> is there in postgres anything similar to:
> insert .... on duplicate update?
> here is the problem i need a solution for:
> I need to insert in pg_type a row which was previously selected from
> there and
> with slight modifications, the problem is that when i try to insert the row
> there might be a row with the same 'typname' which is sort of primary key.
> The second problem is that when doing those operations i don't want to
> depend
> on the specific structure of the pg_type catalog.

Are you certain it will always be safe to do this?

How will you provide meaningful values for columns you don't know exist?

--
Richard Huxton
Archonet Ltd

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message mad 2005-11-09 12:42:39 resetting superuser password
Previous Message Andreas Seltenreich 2005-11-09 12:27:45 Re: psql error on quitting...