Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 48CEF2E0212 for ; Sat, 2 Feb 2008 20:12:42 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 07392-02 for ; Sat, 2 Feb 2008 20:12:31 -0400 (AST) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.176]) by postgresql.org (Postfix) with ESMTP id 90F462E021C for ; Sat, 2 Feb 2008 20:12:37 -0400 (AST) Received: by py-out-1112.google.com with SMTP id d37so2800501pye.29 for ; Sat, 02 Feb 2008 16:12:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=0BNcaWNtEbYPeT47JzgcYGMsojxJdEJ6tEwzGJpNjIc=; b=DNt7A/4ZkGrGgMRStH8ReZZ67tuv2VZ/dXiKVfJvmBSCAPQI7G4b2s/6D9gbm/5Ju4ITCl8PLbxnv1b1dDvl0Z0gzcFSjvlJjEn65DFKVeOS260La/pUjr5G2O5zbEcQd5w3Bz1KatKDTs5WVsURLhnTvKDxHEOSN6QD4uxB1dA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=a3J+rdB2RPb0dE4zBmrhv21pHgQVCpXd6E9qcY6iDDRtmi9FPFXW8wMRSsBcpoA8TdaBnJoZJ7oUGPuAEgPoje76sdzSoeVRL7LNY4w5+38hq/hkFPgNGuHNTW5z75yi2MfyEyFpA69qSVaTu+ta3auT+091KQ1wDQm1w1AAkYk= Received: by 10.143.17.13 with SMTP id u13mr2914380wfi.69.1201997552711; Sat, 02 Feb 2008 16:12:32 -0800 (PST) Received: by 10.143.53.4 with HTTP; Sat, 2 Feb 2008 16:12:32 -0800 (PST) Message-ID: <36e682920802021612w5b04ca7dk80925b913f4b7261@mail.gmail.com> Date: Sat, 2 Feb 2008 19:12:32 -0500 From: "Jonah H. Harris" To: chrisj Subject: Re: can a insert with a returning clause be subquery ? Cc: pgsql-sql@postgresql.org In-Reply-To: <15248628.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <15248628.post@talk.nabble.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/5 X-Sequence-Number: 30096 On Feb 2, 2008 6:22 PM, chrisj wrote: > I know I could do this easily with a stored proc, > but it seems like an obvious use of the returning clause > > Am I missing some syntax error Nope, you're not missing anything. When I initially wrote this for Postgres, it didn't support all cases; including the one you're running into. It's not extremely difficult to extend, but as there are so few people asking for this functionality, no one has found it important enough to warrant extension. Perhaps I'll get to it for 8.4. -- Jonah H. Harris, Sr. Software Architect | phone: 732.331.1324 EnterpriseDB Corporation | fax: 732.331.1301 499 Thornall Street, 2nd Floor | jonah.harris@enterprisedb.com Edison, NJ 08837 | http://www.enterprisedb.com/