Re: proposal: possibility to read dumped table's name from file - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: proposal: possibility to read dumped table's name from file
Date
Msg-id CAFj8pRB5KHVuUDb-FK+8wWWDLK9wbN2hYpcWhvnA3bx2m8Yciw@mail.gmail.com
Whole thread Raw
In response to Re: proposal: possibility to read dumped table's name from file  (Daniel Gustafsson <daniel@yesql.se>)
List 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/

pgsql-hackers by date:

Previous
From: "蔡梦娟(玊于)"
Date:
Subject: 回复:Queries that should be canceled will get stuck on secure_write function
Next
From: Robert Haas
Date:
Subject: Re: extensible options syntax for replication parser?