mirror of
https://github.com/postgres/postgres.git
synced 2025-07-03 20:02:46 +03:00
Error out if SKIP LOCKED and WITH TIES are both specified
Both bugs #16676[1] and #17141[2] illustrate that the combination of SKIP LOCKED and FETCH FIRST WITH TIES break expectations when it comes to rows returned to other sessions accessing the same row. Since this situation is detectable from the syntax and hard to fix otherwise, forbid for now, with the potential to fix in the future. [1] https://postgr.es/m/16676-fd62c3c835880da6@postgresql.org [2] https://postgr.es/m/17141-913d78b9675aac8e@postgresql.org Backpatch-through: 13, where WITH TIES was introduced Author: David Christensen <david.christensen@crunchydata.com> Discussion: https://postgr.es/m/CAOxo6XLPccCKru3xPMaYDpa+AXyPeWFs+SskrrL+HKwDjJnLhg@mail.gmail.com
This commit is contained in:
@ -185,7 +185,8 @@ ExecRefreshMatView(RefreshMatViewStmt *stmt, const char *queryString,
|
||||
if (concurrent && stmt->skipData)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_SYNTAX_ERROR),
|
||||
errmsg("CONCURRENTLY and WITH NO DATA options cannot be used together")));
|
||||
errmsg("%s and %s options cannot be used together",
|
||||
"CONCURRENTLY", "WITH NO DATA")));
|
||||
|
||||
/*
|
||||
* Check that everything is correct for a refresh. Problems at this point
|
||||
|
Reference in New Issue
Block a user