"Mike Bayer" <mike_mp(at)zzzcomputing(dot)com> writes:
> correct, this is observed using all Python postgresql drivers, I was using psql to make an easy repro
As Jian said, this was reported and fixed last month.
(I checked that your example works against v17 branch tip.)
Should appear in 17.3.
regards, tom lane