Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Usf2V-0003D3-6P for pgsql-students@arkaria.postgresql.org; Fri, 28 Jun 2013 20:13:03 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Usf2U-0003MV-DU for pgsql-students@arkaria.postgresql.org; Fri, 28 Jun 2013 20:13:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Usf2T-0003MO-VV for pgsql-students@postgresql.org; Fri, 28 Jun 2013 20:13:02 +0000 Received: from mail-bk0-x234.google.com ([2a00:1450:4008:c01::234]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Usf2R-0007wb-7p for pgsql-students@postgresql.org; Fri, 28 Jun 2013 20:13:01 +0000 Received: by mail-bk0-f52.google.com with SMTP id d7so936120bkh.39 for ; Fri, 28 Jun 2013 13:12:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :x-enigmail-version:content-type:content-transfer-encoding; bh=EPF7ArQtHc7+1KQjmE4abLEQT6xbDZvYM4md1pNYLHg=; b=RiBsGNcQKvljjk+PbwMRbxRZvYrENoWjAVzDNgGIzFbxrlhYxbRW1CAcgom5fl/TRB ChaZhmO/NLtu3cVfluad9ug0SKYd+ul36+xnVl8o7PtdQJ+I0vGuQjDnJq0WYrds0+hs 7WF3LsXruNBG2+mgR6de1wAM5ysQjD5WgLbIVmkqOjDhTjBJMr1B9XQjgHLpA5XjvWTZ dNMEcfsdgo2S0QE0kC4UtQY3kHojEjcvDu8rfgk+i6qcxPCMquNhkaf2lVWM2GmThKq0 2iEcH7K2465/JaW/0GNJoEUPO34KuVL9/tHo/uudl3Umq/n7IXctqq6wIp7xAs6C/jXA 0GhQ== X-Received: by 10.204.183.69 with SMTP id cf5mr2000862bkb.95.1372450377010; Fri, 28 Jun 2013 13:12:57 -0700 (PDT) Received: from [192.168.1.2] (77-254-23-229.adsl.inetia.pl. [77.254.23.229]) by mx.google.com with ESMTPSA id eu16sm4268527bkc.0.2013.06.28.13.12.54 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 28 Jun 2013 13:12:56 -0700 (PDT) Message-ID: <51CDEE41.5030606@gmail.com> Date: Fri, 28 Jun 2013 22:12:49 +0200 From: Karol Trzcionka User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130403 Thunderbird/17.0.5 MIME-Version: 1.0 To: pgsql-students@postgresql.org Subject: UPDATE... RETURNING AFTER/BEFORE X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -0.5 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-students Precedence: bulk Sender: pgsql-students-owner@postgresql.org Hello, the core of the feature is done. It works for simple statements like: UPDATE foo2 SET bar1=bar1+1 RETURNING before.bar1, after.bar1, foo2.bar1, foo2.bar1*before.bar1 AS sth; or UPDATE foo SET bar = bar || ' __ ' RETURNING md5(after.bar), md5(before.bar); However some of regression tests fail (71 of 136) and it is the next step of my work. The other problem is the performance, it unnecessary Seq Scan over whole table (values from these scans are not used). Regards, Karol Trzcionka -- Sent via pgsql-students mailing list (pgsql-students@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-students