Received: from mail.astrofoto.org (dsl092-102-177.nyc2.dsl.speakeasy.net [66.92.102.177]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fAJ403m11745 for ; Sun, 18 Nov 2001 23:00:04 -0500 (EST) (envelope-from roland@astrofoto.org) Received: from kuiper.rlent.pnet (IDENT:root@kuiper.rlent.pnet [192.168.2.50]) by mail.astrofoto.org (8.11.6/8.11.6) with ESMTP id fAJ408I21520 for ; Sun, 18 Nov 2001 23:00:08 -0500 Received: (from roland@localhost) by kuiper.rlent.pnet (8.11.6/8.11.0) id fAJ407Z03180; Sun, 18 Nov 2001 23:00:07 -0500 X-Authentication-Warning: kuiper.rlent.pnet: roland set sender to roland@rlenter.com using -f To: pgsql-sql@postgresql.org Subject: Re: PL/pgSQL examples NOT involving functions References: From: Roland Roberts Date: 18 Nov 2001 23:00:07 -0500 In-Reply-To: Message-ID: Lines: 19 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Archive-Number: 200111/262 X-Sequence-Number: 5644 >>>>> "Josh" == Josh Berkus writes: Josh> Personally, I find that keeping track, on the client side, Josh> of whether you're adding a new record or editing an old one Josh> and acting appropriately is better than trying to Josh> second-guess it on the database level, but maybe that's just Josh> me. Well, that's basically what I'm trying to do. But finding out whether I need to insert or update requires doing something like my pseudo-SQL example. I was just trying to figure out if I could do in in SQL pl/pgSQL. roland -- PGP Key ID: 66 BC 3B CD Roland B. Roberts, PhD RL Enterprises roland@rlenter.com 76-15 113th Street, Apt 3B roland@astrofoto.org Forest Hills, NY 11375