IF...THEN...ELSE on INSERT

From: Vincent AE Scott <pgsql-novice(at)codex(dot)net>
To: pgsql-novice(at)postgresql(dot)org
Subject: IF...THEN...ELSE on INSERT
Date: 2001-12-07 11:34:06
Message-ID: 20011207113406.A24282@majestic.ukshells.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

What's the fastest / most effecient way todo a test on an insert
operation and then change the SQL that gets exeuted?

Specifically, i want to check if a row already exists, and then instead
of inserting the row, just increment a counter for that row.

your TIA,
-vince

--

PGP key: http://codex.net/pgp/pgp.asc

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Andrew McMillan 2001-12-07 11:56:29 Re: IF...THEN...ELSE on INSERT
Previous Message Andrew McMillan 2001-12-07 08:59:52 Re: Storing number '001' ?