Re: ERROR: ExecutePlan: (junk) `ctid' is NULL! - Mailing list pgsql-general

From Tom Lane
Subject Re: ERROR: ExecutePlan: (junk) `ctid' is NULL!
Date
Msg-id 17441.1051655819@sss.pgh.pa.us
Whole thread Raw
In response to ERROR: ExecutePlan: (junk) `ctid' is NULL!  ("Jim C. Nasby" <jim@nasby.net>)
Responses Re: ERROR: ExecutePlan: (junk) `ctid' is NULL!  ("Jim C. Nasby" <jim@nasby.net>)
List pgsql-general
"Jim C. Nasby" <jim@nasby.net> writes:
> stats=> UPDATE Tsummary
> stats->     SET participants = count(distinct credit_id)
> stats->             , teams = count(distinct team_id)
> stats->     FROM email_contrib_today ect
> stats->     WHERE ect.project_id = :ProjectID
> stats-> ;
> ERROR:  ExecutePlan: (junk) `ctid' is NULL!

We really oughta reject UPDATE commands with aggregates at the top
level.  It's not well-defined, it's illegal per SQL spec, and it tends
to get the executor all confused ...

            regards, tom lane


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: dump/restore to 7.4devel giving "[archiver (db)] error returned by PQputline"
Next
From: Hadley Willan
Date:
Subject: Simple question about messages