Disallow aggregate functions in UPDATE commands (unless within a sub-SELECT).
authorTom Lane <[email protected]>
Wed, 21 Jun 2006 18:30:19 +0000 (18:30 +0000)
committerTom Lane <[email protected]>
Wed, 21 Jun 2006 18:30:19 +0000 (18:30 +0000)
commit06b58974c2bc447d01b8f53d824b2cf392f06b10
tree93bc43d2370961c8ac698b654d90c62f6639efc0
parentbefc9e277f7d38dc2205df0ab2f5dcd430b7dad1
Disallow aggregate functions in UPDATE commands (unless within a sub-SELECT).
This is disallowed by the SQL spec because it doesn't have any very sensible
interpretation.  Historically Postgres has allowed it but behaved strangely.
As of PG 8.1 a server crash is possible if the MIN/MAX index optimization gets
applied; rather than try to "fix" that, it seems best to just enforce the
spec restriction.  Per report from Josh Drake and Alvaro Herrera.
src/backend/parser/analyze.c