On Tue, Nov 29, 2011 at 9:32 PM, Bruce Momjian <[email protected]> wrote: > Tom Lane wrote: >> "David Fetter" <[email protected]> writes: >> > IF EXISTS (SELECT 1 INTO STRICT i) THEN >> > 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?
At most I would say we could try to improve the error message. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-bugs mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
