Skip site navigation (1) Skip section navigation (2)

Re: BUG #6067: In PL/pgsql, EXISTS(SELECT ... INTO...) fails

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: David Fetter <dfetter(at)vmware(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6067: In PL/pgsql, EXISTS(SELECT ... INTO...) fails
Date: 2011-11-30 02:32:42
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
Tom Lane wrote:
> "David Fetter" <dfetter(at)vmware(dot)com> writes:
> >         RAISE NOTICE '%', a;
> >     END IF;
> Umm ... are you just complaining that the error message isn't very
> helpful, or are you actually expecting that to do something useful?
> If the latter, what exactly?  I'm particularly confused by your use
> of the STRICT option here, because if we did support that, I would
> expect the STRICT to throw an error if there were not exactly one
> matching row, making the EXISTS test 100% pointless.
> But the short answer is that we don't support INTO in sub-selects,
> and in general I doubt that we ever will, since in most cases the
> behavior wouldn't be very well-defined.  It might be worth a TODO
> to provide a better error message than "syntax error", though.

Is it worth documenting, fixing, or adding this to the TODO list?

  Bruce Momjian  <bruce(at)momjian(dot)us>

  + It's impossible for everything to be true. +

In response to


pgsql-bugs by date

Next:From: Bruce MomjianDate: 2011-11-30 03:53:39
Subject: Re: BUG #6064: != NULL, <> NULL do not work [sec=UNCLASSIFIED]
Previous:From: Kasia TuszynskaDate: 2011-11-29 22:08:11
Subject: Re: transaction error handling

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group