"David Sanchez i Gregori" <delkos_2000(at)yahoo(dot)es> writes:
> select * from(
> select min("ID") as nid from "Seguretat"."Usuarios" as j
> where not exists
> ( select 1 from "Seguretat"."Usuarios" as k where k."ID"=j."ID")
> ) as b
Confirmed here, as far back as 8.1. It sort of looks like the
indexes-for-min-and-max patch has confused the older code for Param
assignment. I'm surprised this wasn't reported earlier...
regards, tom lane