iffyio commented on code in PR #2391:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/2391#discussion_r3504654494
##########
src/parser/mod.rs:
##########
@@ -14479,6 +14479,13 @@ impl<'a> Parser<'a> {
locks.push(self.parse_lock()?);
}
}
+
+ // PostgreSQL accepts `LIMIT`/`OFFSET` after the row-locking clause
+ // (e.g. `... FOR UPDATE SKIP LOCKED LIMIT 5`) as well as before
it.
+ if limit_clause.is_none() &&
self.dialect.supports_limit_after_locking_clause() {
Review Comment:
```suggestion
if limit_clause.is_none() {
```
I think we can skip the dialect flag entirely here, since the FOR UPDATE
isn't dialect guarded either?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]