From: | "Peter Filipov" <pfilipov(at)netissat(dot)bg> |
---|---|
To: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | insert on duplicate update? |
Date: | 2005-11-09 11:31:59 |
Message-ID: | opszy0zlg8ligf9v@draco |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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. I want my procedure
to work even if in some future release additional columns to pg_type are
added.
So what i want is to insert a row in a table that was previously selected
from the same
table but if there is primary key collision i want to update the row that
collided. And
all these without being dependant on the table structure.
--
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
From | Date | Subject | |
---|---|---|---|
Next Message | Martijn van Oosterhout | 2005-11-09 12:23:23 | Re: insert on duplicate update? |
Previous Message | surabhi.ahuja | 2005-11-09 11:18:13 | Postmaster failing to start on reboot |