Repository navigation
PostgreSQL: Support CREATE FOREIGN DATA WRAPPER - #2317
Conversation
|
I suggest to split the PR into two, once for each statement |
538c418 to
54177bd
Compare
|
split. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2317 +/- ##
==========================================
+ Coverage 82.18% 82.20% +0.01%
==========================================
Files 42 42
Lines 35253 35314 +61
Branches 35253 35314 +61
==========================================
+ Hits 28974 29029 +55
+ Misses 2717 2716 -1
- Partials 3562 3569 +7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
59608c6 to
4d03db2
Compare
LucaCappelletti94
left a comment
There was a problem hiding this comment.
Do please also add some seed entries for the fuzzer corpus, so it can better search bugs that are relevant to this syntax.
LucaCappelletti94
left a comment
There was a problem hiding this comment.
Most likely "A repeated clause errors." should be dropped from the description once the parser keeps repeats, given the pg_query reference.
LucaCappelletti94
left a comment
There was a problem hiding this comment.
I found the following regression with main, apparently these changes broke the parsing of this mysql syntax:
#[test]
fn parse_flush_preserves_keyword_table_names() {
for sql in [
"FLUSH TABLES handler WITH READ LOCK",
"FLUSH TABLES validator WITH READ LOCK",
] {
mysql_and_generic().verified_stmt(sql);
}
}
thanks again! fixed |
LucaCappelletti94
left a comment
There was a problem hiding this comment.
LGTM! I will rebase it and then it should be good to go.
cc @alamb
Share one has_modifier check between the FOREIGN TABLE and FOREIGN DATA WRAPPER arms so temporary/or-alter/global no longer parse and render as a bare CREATE FOREIGN DATA WRAPPER. Add fuzz seeds.
Co-authored-by: Luca Cappelletti <cappelletti.luca94@gmail.com>
Co-authored-by: Luca Cappelletti <cappelletti.luca94@gmail.com>
Co-authored-by: Luca Cappelletti <cappelletti.luca94@gmail.com>
Co-authored-by: Luca Cappelletti <cappelletti.luca94@gmail.com>
Co-authored-by: Luca Cappelletti <cappelletti.luca94@gmail.com>
Co-authored-by: Luca Cappelletti <cappelletti.luca94@gmail.com>
Co-authored-by: Luca Cappelletti <cappelletti.luca94@gmail.com>
Co-authored-by: Luca Cappelletti <cappelletti.luca94@gmail.com>
80378b9 to
73e73fe
Compare
Parses
CREATE FOREIGN DATA WRAPPER name [HANDLER fn | NO HANDLER] [VALIDATOR fn | NO VALIDATOR] [OPTIONS (...)](docs).Split out of this PR at @LucaCappelletti94's request.
CREATE FOREIGN TABLEis now #2515.HANDLERandVALIDATORare accepted in either order, because the PostgreSQL grammar takes them as an unordered list even though the doc synopsis shows one order.ALTER FOREIGN DATA WRAPPERandCREATE USER MAPPINGare out of scope.Ported from the
pgmold-sqlparserfork.