Re: CURRENT OF causes an error when IndexOnlyScan is used
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Yugo Nagata <nagata@sraoss.co.jp>
Cc: pgsql-hackers@postgresql.org
Date: 2018-02-01T02:12:51Z
Lists: pgsql-hackers
Yugo Nagata <nagata@sraoss.co.jp> writes: > I'm sorry the patch attached in the previous mail is broken and > not raises a compile error. I attached the fixed patch. This patch is almost certainly wrong: you can't assume that the scan-level state matches the tuple we are currently processing at top level. Any sort of delaying action, for instance a sort or materialize node in between, would break it. We need to either fix this aspect: >> IndexOnlyScan returns a virtual tuple that doesn't have system >> column, so we can not get ctid in the same way of other plans. or else disallow using IndexOnlyScan when the ctid is needed. regards, tom lane
Commits
-
Fix WHERE CURRENT OF when the referenced cursor uses an index-only scan.
- 8f5ac440430a 11.0 landed
- ee7bf0fd9fa7 10.4 landed
- 7de7ddb27a86 9.5.13 landed
- 5b77c11da24a 9.3.23 landed
- 12d18b4870a2 9.6.9 landed
- 0a0721f84c40 9.4.18 landed