Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 4257C1C315B1 for ; Wed, 18 Apr 2012 13:24:42 -0300 (ADT) Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SKXgO-0006uE-Oh for pgsql-sql@postgresql.org; Wed, 18 Apr 2012 16:24:41 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id q3IGORuq004421; Wed, 18 Apr 2012 12:24:27 -0400 (EDT) To: Dennis cc: pgsql-sql@postgresql.org Subject: Re: Uniform UPDATE queries In-reply-to: <4F8E936A.9050303@victorem.com> References: <4F8E936A.9050303@victorem.com> Comments: In-reply-to Dennis message dated "Wed, 18 Apr 2012 12:11:54 +0200" Date: Wed, 18 Apr 2012 12:24:27 -0400 Message-ID: <4420.1334766267@sss.pgh.pa.us> From: Tom Lane X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201204/34 X-Sequence-Number: 36511 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