[BUGS] BUG #14748: Invalid statement should raise parse error,but ignores invalid part instead - Mailing list pgsql-bugs

From johnthuss@gmail.com
Subject [BUGS] BUG #14748: Invalid statement should raise parse error,but ignores invalid part instead
Date
Msg-id 20170717145126.9231.80296@wrigleys.postgresql.org
Whole thread Raw
Responses Re: [BUGS] BUG #14748: Invalid statement should raise parse error,but ignores invalid part instead  (Andres Freund <andres@anarazel.de>)
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      14748
Logged by:          John Huss
Email address:      johnthuss@gmail.com
PostgreSQL version: 9.6.1
Operating system:   Linux
Description:

This statement is invalid because the 'AND' should be a WHERE or a comma:

update mytable set active = false and foreign_ID = 18984

But when executed it doesn't raise a parse error and simply ignores the
'and' and everything after it.

The result of the statement is that every row in the table is updated with
active=false.

I would expect this to throw a parse error.


--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

pgsql-bugs by date:

Previous
From: durgas009@gmail.com
Date:
Subject: [BUGS] BUG #14747: Postgres installation failing as non-root user
Next
From: Andres Freund
Date:
Subject: Re: [BUGS] BUG #14748: Invalid statement should raise parse error,but ignores invalid part instead