Re: proposal: possibility to read dumped table's name from file

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, Surafel Temesgen <surafel3000(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: proposal: possibility to read dumped table's name from file
Date: 2021-09-21 16:20:52
Message-ID: CAFj8pRB5KHVuUDb-FK+8wWWDLK9wbN2hYpcWhvnA3bx2m8Yciw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

> The above comments are fixed in the attached, as well as a pass over the
> docs
> and extended tests to actually test matching a foreign server. What do
> think
> about this version? I'm still not convinced that there aren't more quoting
> bugs in the parser, but I've left that intact for now.
>

The problematic points are double quotes and new line char. Any other is
just in sequence of bytes.

I have just one note to your patch. When you use pg_strncasecmp, then you
have to check the size too

char *xxx = "incl";
int xxx_size = 4;

elog(NOTICE, ">>>>%d<<<<",
pg_strncasecmp(xxx, "include", xxx_size) == 0);

result is NOTICE: >>>>1<<<<

"incl" is not keyword "include"

Regards

Pavel

>
> --
> Daniel Gustafsson https://vmware.com/
>
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2021-09-21 16:27:21 Re: extensible options syntax for replication parser?
Previous Message 蔡梦娟 (玊于) 2021-09-21 16:14:49 回复:Queries that should be canceled will get stuck on secure_write function