Re: Postgresql "FIFO" Tables, How-To ?

Jim C. Nasby <jim@nasby.net>

From: "Jim C. Nasby" <jim@nasby.net>
To: Dmitry Tkach <dmitry@openratings.com>
Cc: Sean Chittenden <sean@chittenden.org>, Andrew Sullivan <andrew@libertyrms.info>, pg_general <pgsql-general@postgresql.org>
Date: 2003-07-16T19:55:45Z
Lists: pgsql-general
On Wed, Jul 16, 2003 at 03:40:47PM -0400, Dmitry Tkach wrote:
> I believe, you can save one query by replacing 'if exists then update else 
> insert' part with just 'delete unconditionally then insert'
 
I was going to mention this. Because updates in PGSQL are actually
DELETE/INSERT in a single statement, you can just code it that way.
-- 
Jim C. Nasby, Database Consultant                  jim@nasby.net
Member: Triangle Fraternity, Sports Car Club of America
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"