Re: proposal: possibility to read dumped table's name from file
Pavel Stehule <pavel.stehule@gmail.com>
From: Pavel Stehule <pavel.stehule@gmail.com>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Alvaro Herrera <alvherre@2ndquadrant.com>, Tomas Vondra <tomas.vondra@enterprisedb.com>,
Justin Pryzby <pryzby@telsasoft.com>, Dean Rasheed <dean.a.rasheed@gmail.com>, Stephen Frost <sfrost@snowman.net>, Surafel Temesgen <surafel3000@gmail.com>, vignesh C <vignesh21@gmail.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2021-09-17T13:06:51Z
Lists: pgsql-hackers
> > > > Initially not, but now, when I am thinking about it, I don't think so > Bison helps. The syntax of the filter file is nicely linear. Now, the code > of the parser is a little bit larger than minimalistic, but it is due to > nicer error's messages. The raw implementation in Bison raised just "syntax > error" and positions. I did code refactoring, and now the scanning, parsing > and processing are divided into separated routines. Parsing related code > has 90 lines. In this case, I don't think using a parser grammar file can > carry any benefit. grammar is more readable, sure, but we need to include > bison, we need to handle errors, and if we want to raise more helpful > errors than just "syntax error", then the code will be longer. > > I'm not so concerned by code size, but rather parsing of quotations etc and > being able to reason about it's correctness. IMHO that's easier done by > reading a defined grammar than parsing a handwritten parser. > > In this case the complex part is not a parser, but the scanner is complex and writing this in flex is not too easy. I wrote so the grammar file can be more readable, but the usual error from Bison is "syntax error" and position, so it does not win from the user perspective. When a parser is not linear, then a generated parser can help a lot, but using it at this moment is premature. > Will do a closer review on the patch shortly. > > -- > Daniel Gustafsson https://vmware.com/ > >
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix array subscript warnings
- 17935e1fdf0a 17.0 landed
-
Read include/exclude commands for dump/restore from file
- a5cf808be55b 17.0 landed
-
Allow records to span multiple lines in pg_hba.conf and pg_ident.conf.
- 8f8154a503c7 14.0 cited