From: | Matthew Peter <survivedsushi(at)yahoo(dot)com> |
---|---|
To: | Jaime Casanova <systemguards(at)gmail(dot)com> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: update question |
Date: | 2005-12-05 23:41:23 |
Message-ID: | 20051205234123.82345.qmail@web35208.mail.mud.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Matthew Peter | 2005-12-05 23:43:32 | Re: update question |
Previous Message | Jaime Casanova | 2005-12-05 23:08:42 | Re: update question |