pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone.bigpanda.com>
To: Deepak Malhotra <deepakjm@yahoo.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Hello Testing
Date: Sat, 16 Aug 2003 14:25:41 -0700 (PDT)
Message-ID: <20030816142029.K67239-100000@megazone.bigpanda.com> (raw)
In-Reply-To: <20030816205508.13985.qmail@web13506.mail.yahoo.com>

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?





view thread (2+ messages)

Message-ID: <20030816142029.K67239-100000@megazone.bigpanda.com>
Permalink:  ../20030816142029.K67239-100000@megazone.bigpanda.com/
Also on:    postgresql.org/message-id/20030816142029.K67239-100000@megazone.bigpanda.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: sszabo@megazone.bigpanda.com, deepakjm@yahoo.com
  Subject: Re: Hello Testing
  In-Reply-To: <20030816142029.K67239-100000@megazone.bigpanda.com>
  References: <20030816205508.13985.qmail@web13506.mail.yahoo.com> <20030816142029.K67239-100000@megazone.bigpanda.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox