Well ya, stored procedure also was thinking about pre-insert trigger.
Am sure folks here must have gone thru this and had alternatives. Also was reading about merge_by_key.
On Wed, May 15, 2013 at 12:51 PM, Daniel Farina <daniel@heroku.com> wrote:
On Wed, May 15, 2013 at 11:44 AM, Dev Kumkar <devdas.kumkar@gmail.com> wrote: > Hello, > > Is there an alternative of Sybase "on existing update" construct in pgsql. > > "ON DUPLICATE KEY UPDATE" doesn't work. > > Thanks in advance!
No, you'll have to either handle this in the application or use a stored procedure at this time. The omission of such a construct from psql's "\h" command and the manual is not in error.