Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id AB994125F9C6 for ; Thu, 19 Apr 2012 05:56:03 -0300 (ADT) Received: from fep15.mx.upcmail.net ([62.179.121.35]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SKn9i-0003Nr-Fs for pgsql-sql@postgresql.org; Thu, 19 Apr 2012 08:56:02 +0000 Received: from edge01.upcmail.net ([192.168.13.236]) by viefep15-int.chello.at (InterMail vM.8.01.05.05 201-2260-151-110-20120111) with ESMTP id <20120419085542.YJZP18555.viefep15-int.chello.at@edge01.upcmail.net>; Thu, 19 Apr 2012 10:55:42 +0200 Received: from titikaka.workgroup ([188.202.89.233]) by edge01.upcmail.net with edge id zkvh1i01c524tJs01kviM4; Thu, 19 Apr 2012 10:55:42 +0200 X-SourceIP: 188.202.89.233 X-Authenticated-Sender: dennis.verbeek Message-ID: <4F8FEF2D.6050501@victorem.com> Date: Thu, 19 Apr 2012 12:55:41 +0200 From: Dennis User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120312 Thunderbird/11.0 MIME-Version: 1.0 To: Tom Lane CC: "pgsql-sql@postgresql.org" Subject: Re: Uniform UPDATE queries References: <4F8E936A.9050303@victorem.com> <4420.1334766267@sss.pgh.pa.us> In-Reply-To: <4420.1334766267@sss.pgh.pa.us> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.1 (-) X-Archive-Number: 201204/42 X-Sequence-Number: 36519 Hello Tom, The example you have given is EXACTLY why something like CURRENT is needed to limit the number of unique queries or prepared statements. (or to do a selection of all values before an update meaning two executed queries.) regards,. Dennis On 04/18/2012 06:24 PM, Tom Lane wrote: > Dennis writes: >> When a query is written to update a table, the usual process is to list all the columns that need >> updating. This could imply the creation of many possible queries for many columns. In an effort to >> keep the UPDATE queries more uniform, less number of unique queries, a keyword similar to DEFAULT, >> let's say CURRENT, is required to indicate that the current value must not change. > No it isn't. Just write the name of the column, eg > > update mytable set x = x, y =, z = z where ... > > There's no reason to invent nonstandard syntax for this. > > regards, tom lane > > >