From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
---|---|
To: | Daniel Gustafsson <daniel(at)yesql(dot)se> |
Cc: | Xuneng Zhou <xunengzhou(at)gmail(dot)com>, srinath2133(at)gmail(dot)com, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Bug in pg_dump --filter? - Invalid object types can be misinterpreted as valid |
Date: | 2025-08-06 04:49:32 |
Message-ID: | CAHGQGwEw=LNGmk7+iXwEpCYEnr2nn3A3kXkfAs4C869RrVy3Dw@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Aug 5, 2025 at 4:52 PM Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:
>
> > On 4 Aug 2025, at 17:18, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>
> I missed this thread while being on vacation, thanks for finding and fixing
> this!
>
> > This also got me thinking, if we simply define keywords as strings of
> > non-whitespace characters, maybe we don't need to change the term "keyword"
> > to "token" at all. I've updated the patch with that in mind. Thoughts?
>
> Agreed, this should work fine, and it aligns the code somwhat with read_pattern
> which is a good thing.
>
> + * in line buffer. Returns NULL when the buffer is empty or no keyword exists.
> Since "is empty" could be interpreted as being a null pointer, maybe we should
> add a if (!*line) check (or an Assert) before we dereference the passed in
> buffer?
Thanks for the review!
I've added Assert(*line != NULL) at the start of filter_get_keyword().
Updated patch attached.
Regards,
--
Fujii Masao
Attachment | Content-Type | Size |
---|---|---|
v3-0001-pg_dump-Fix-incorrect-parsing-of-object-types-in-.patch | application/octet-stream | 4.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Alexandra Wang | 2025-08-06 04:50:01 | LISTEN/NOTIFY bug: VACUUM sets frozenxid past a xid in async queue |
Previous Message | Chao Li | 2025-08-06 04:41:46 | Enhance Makefiles to rebuild objects on map file changes |