Search Postgresql Archives

Re: Insert Or update

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



What do you need to do more of, inserts or updates? If the answer is
updates, just do an update and then check for the number of rows affected.
If it is 0, follow it with an insert, if not, you are done.

You could do this in a stored procedure to save you the round trip of data
between the DB and your application and will be faster.

Cheers,
Bas.

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux