X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 6F059D1B89E for ; Sat, 16 Aug 2003 21:25:50 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 30521-05 for ; Sat, 16 Aug 2003 18:25:42 -0300 (ADT) Received: from megazone.bigpanda.com (45.mufb.snfc.sffca01r18.dsl.att.net [12.103.249.45]) by svr1.postgresql.org (Postfix) with ESMTP id 7508AD1B897 for ; Sat, 16 Aug 2003 18:25:39 -0300 (ADT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 9B639D60E; Sat, 16 Aug 2003 14:25:41 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 910CF5C0C; Sat, 16 Aug 2003 14:25:41 -0700 (PDT) Date: Sat, 16 Aug 2003 14:25:41 -0700 (PDT) From: Stephan Szabo To: =?iso-8859-1?q?Deepak=20Malhotra?= Cc: Subject: Re: Hello Testing In-Reply-To: <20030816205508.13985.qmail@web13506.mail.yahoo.com> Message-ID: <20030816142029.K67239-100000@megazone.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/191 X-Sequence-Number: 9912 On Sat, 16 Aug 2003, [iso-8859-1] Deepak Malhotra wrote: > Hello > > Any idea why I am getting > "ERROR: More than one tuple returned by a subselect > used as an expression" > while running update statement using subselect > statement. That usually means you're using a subselect that returns multiple rows in a context where a scalar is expected, for example update foo set bar = (select abc from def); works if def has 0 rows (giving a NULL) or 1 row (giving a value), but if the subselect returned say 3 rows, which gets used to update each row from foo?