By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,846 Members | 2,077 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,846 IT Pros & Developers. It's quick & easy.

INSERT ON DUPLICATE KEY UPDATE

P: n/a
How may I do a INSERT ON DUPLICATE KEY UPDATE like in mysql:
http://dev.mysql.com/doc/mysql/en/INSERT.html
?

Eduardo

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Something like

INSERT OR UPDATE TABLE foo SET bar=something WHERE condition

in meaning of "try to insert, if some unique constraint for some column (or
index) fail, make just an update" would be nice....
----- Original Message -----
From: "Eduardo Pérez Ureta" <ep****@it.uc3m.es>
To: <pg***********@postgresql.org>
Sent: Friday, June 18, 2004 6:38 PM
Subject: [GENERAL] INSERT ON DUPLICATE KEY UPDATE

How may I do a INSERT ON DUPLICATE KEY UPDATE like in mysql:
http://dev.mysql.com/doc/mysql/en/INSERT.html
?

Eduardo

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #2

P: n/a
Something like

INSERT OR UPDATE TABLE foo SET bar=something WHERE condition

in meaning of "try to insert, if some unique constraint for some column (or
index) fail, make just an update" would be nice....
----- Original Message -----
From: "Eduardo Pérez Ureta" <ep****@it.uc3m.es>
To: <pg***********@postgresql.org>
Sent: Friday, June 18, 2004 6:38 PM
Subject: [GENERAL] INSERT ON DUPLICATE KEY UPDATE

How may I do a INSERT ON DUPLICATE KEY UPDATE like in mysql:
http://dev.mysql.com/doc/mysql/en/INSERT.html
?

Eduardo

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.