pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Achilleas Mantzios <achill@matrix.gatewaynet.com>
To: pgsql-sql@postgresql.org
Cc: Franklin Haut <franklin.haut@gmail.com>
Subject: Re: Update PK Violation
Date: Wed, 16 Jan 2008 16:30:14 +0200
Message-ID: <200801161630.15623.achill@matrix.gatewaynet.com> (raw)
In-Reply-To: <478D1FB5.2070003@gmail.com>
References: <478D1FB5.2070003@gmail.com>

Στις Tuesday 15 January 2008 23:03:49 ο/η Franklin Haut έγραψε:
> Hi all,
> 
> i have a problem with one update sentence sql.
> 

A simple way i use:

foodb=# update temp set num = num*1000  where num >= 5;
foodb=# insert into temp values (5, 'NOT');
foodb=# update temp set num = 1 + num/1000  where num >= 6;

-- 
Achilleas Mantzios



view thread (6+ messages)  latest in thread

Message-ID: <200801161630.15623.achill@matrix.gatewaynet.com>
Permalink:  ../200801161630.15623.achill@matrix.gatewaynet.com/
Also on:    postgresql.org/message-id/200801161630.15623.achill@matrix.gatewaynet.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: achill@matrix.gatewaynet.com, franklin.haut@gmail.com
  Subject: Re: Update PK Violation
  In-Reply-To: <200801161630.15623.achill@matrix.gatewaynet.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