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

From: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
To: Dmitry Tkach <dmitry(at)openratings(dot)com>
Cc: Sean Chittenden <sean(at)chittenden(dot)org>, Andrew Sullivan <andrew(at)libertyrms(dot)info>, pg_general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Postgresql "FIFO" Tables, How-To ?
Date: 2003-07-16 19:55:45
Message-ID: 20030716195545.GS5877@nasby.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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(at)nasby(dot)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?"

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Robert J. Sanford, Jr. 2003-07-16 20:01:54 Re: Install new language - Prev: Re: Are you frustrated with PostgreSQL
Previous Message Jim C. Nasby 2003-07-16 19:45:32 Re: Billions of records?