On Fri, Apr 23, 2004 at 17:48:21 +0400,
  Anton Nikiforov <[EMAIL PROTECTED]> wrote:
> I know that this will be helpful to write a function that will do this 
> for me, but it will run the same time as my insertion tool that is 
> written in c or even slower. So my question is: is it possible to have 
> "UPDATE OR INSERT" statement in the PostgreSQL like it is possible in 
> Oracle (as i heard but did not check it by myself yet)?

This was discussed on the list over the last couple of days.
There is no update or insert statement in postgres.
You can do an update and check the number of rows affected and if it
is 0 do the insert.
However unless you lock the table while doing this, you have to be prepared
to handle errors.

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to