On 11 Aug., 22:19, "Rami Chowdhury" <rami.chowdh...@gmail.com> wrote: > Ah, my apologies, I must have been getting it confused with ON UPDATE > [things]. Thanks for correcting me. > > On Tue, 11 Aug 2009 13:10:03 -0700, Matthew Woodcraft > > <matt...@woodcraft.me.uk> wrote: > > "Rami Chowdhury" <rami.chowdh...@gmail.com> writes: > > >> IIRC Postgres has had ON DUPLICATE KEY UPDATE functionality longer than > >> MySQL... > > > PostgreSQL does not have ON DUPLICATE KEY UPDATE. > > > The SQL standard way to do what the OP wants is MERGE. PostgreSQL > > doesn't have that either. > > > -M- > > -- > Rami Chowdhury > "Never attribute to malice that which can be attributed to stupidity" -- > Hanlon's Razor > 408-597-7068 (US) / 07875-841-046 (UK) / 0189-245544 (BD)
So, I'm doing it in right way? What about building columns? map(lambda s: s + ' = %s', fields) Is that o.k.? thanks -- http://mail.python.org/mailman/listinfo/python-list