From: Jaime Casanova <systemguards@gmail.com>
To: Matthew Peter <survivedsushi@yahoo.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: update question
Date: Mon, 5 Dec 2005 18:08:42 -0500
Message-ID: <c2d9e70e0512051508y2a9c4addj5c7927f3f4052775@mail.gmail.com> (raw)
In-Reply-To: <20051205225936.46340.qmail@web35212.mail.mud.yahoo.com>
References: <20051205225936.46340.qmail@web35212.mail.mud.yahoo.com>
On 12/5/05, Matthew Peter <survivedsushi@yahoo.com> wrote:
> I need a throw away value for an insert statement... example...
>
> update table
> set value = 1, value = 2, throw_away_value -- so i don't break the query
> where id = 1;
>
> Thanks
>
What do you mean by "throw away value"?
are you trying to update and if the row doesn't exist then insert? if
that is you can do a function in plpgsql and use exceptions for
that... there is an example in the manuals
--
regards,
Jaime Casanova
(DBA: DataBase Aniquilator ;)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: systemguards@gmail.com, survivedsushi@yahoo.com
Subject: Re: update question
In-Reply-To: <c2d9e70e0512051508y2a9c4addj5c7927f3f4052775@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox