pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Matthew Peter <survivedsushi@yahoo.com>
To: Jaime Casanova <systemguards@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: update question
Date: Mon, 5 Dec 2005 15:41:23 -0800 (PST)
Message-ID: <20051205234123.82345.qmail@web35208.mail.mud.yahoo.com> (raw)
In-Reply-To: <c2d9e70e0512051508y2a9c4addj5c7927f3f4052775@mail.gmail.com>

it's in a loop so there's an extra comma at the  end so i was thinking i could put in a throw away value to keep the  update from breaking if there's an additional comma

Jaime Casanova <systemguards@gmail.com> wrote:  On 12/5/05, Matthew Peter  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 ;)

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org



		
---------------------------------
 Yahoo! Personals
 Single? There's someone we'd like you to meet.
 Lots of someones, actually. Yahoo! Personals

view thread (11+ messages)  latest in thread

Message-ID: <20051205234123.82345.qmail@web35208.mail.mud.yahoo.com>
Permalink:  ../20051205234123.82345.qmail@web35208.mail.mud.yahoo.com/
Also on:    postgresql.org/message-id/20051205234123.82345.qmail@web35208.mail.mud.yahoo.com

 · 

reply

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: survivedsushi@yahoo.com, systemguards@gmail.com
  Subject: Re: update question
  In-Reply-To: <20051205234123.82345.qmail@web35208.mail.mud.yahoo.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