Jan Janak wrote:
> * No support for INSERT OR UPDATE (or REPLACE in MySQL). PostgreSQL does
>   not seem to support "insert or update" type of queries, so I will have
>   to re-implement it using transactions somehow. I am not yet sure
>   exactly how, so suggestions/patches/code are welcome.

Well, I think you can simply run DELETE followed by INSERT within 
transaction block to emulate that. The outside world will not see any 
changes until transaction completes, which should provide the same 
functionality as "INSERT OR UPDATE", i.e.:

BEGIN;
DELETE FROM location WHERE ... LIMIT 1;
INSERT INTO location ...;
END;

If INSERT fails there will be no changes to the database.

Regards,
-- 
Maksym Sobolyev
Sippy Software, Inc.
Internet Telephony (VoIP) Experts
T/F: +1-646-651-1110
Web: http://www.sippysoft.com
_______________________________________________
Serdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/serdev

Reply via email to