Dear Hackers,

I found a bug with FOR PORTION OF: you shouldn't be able to provide it
while using WHERE CURRENT OF with a cursor, but you can. (And it
doesn't do anything sensible.)

According to the SQL standard, combining these is not allowed: you can
give FOR PORTION OF with an <update/delete statement: searched> but
not an <update/delete statement: positioned>. I've attached a patch to
raise an error if you try to use both.

It actually might be nice to support combining them, eventually. But
not in v19. IMO if you gave both, the UPDATE/DELETE would have no
effect if FOR PORTION OF didn't match the row. But maybe that violates
the promise of WHERE CURRENT OF. After all, we don't allow any other
extra conditions when using that syntax.

Yours,

-- 
Paul              ~{:-)
[email protected]

Attachment: v1-0001-Forbid-FOR-PORTION-OF-with-WHERE-CURRENT-OF.patch
Description: Binary data

Reply via email to