pgbench failed when -f option contains a char '@'

2020-12-17 Thread Wang, Shenhao
Hi, hackers pgbench use -f filename[@weight] to receive a sql script file with a weight, but if I create a file contains char'@', like a...@2.sql, specify this file without weigth, pgbench will failed with error: pgbench: fatal: invalid weight specification: @2.sql This action may be unf

invalid data in file backup_label problem on windows

2021-01-10 Thread Wang, Shenhao
Hi hackers. When I using a Non-Exclusive Low-Level Backup on windows, "invalid data in file backup_label" will be shown. The code are listed below if (fscanf(lfp, "START WAL LOCATION: %X/%X (file %08X%16s)%c", &hi, &lo, &tli_from_walseg, startxlogfilename, &ch

errors when there is a bit literal in ecpg

2020-11-06 Thread Wang, Shenhao
Hi, hacker I met an error as below when I use ecpg a.pgc:5: ERROR: invalid bit string literal a.pgc:5: ERROR: internal error: unreachable state; please report this to the test source is attached. After investigating the code, I think the process of pgc.l is: Step 1: {xbstart}, addlitchar('b

RE: invalid data in file backup_label problem on windows

2021-01-14 Thread Wang, Shenhao
Hi, again: On windows, if a backup_label file contains a windows(CRLF) line ending. Recovering from this backup will failed. I think this is a problem, can I add this to commitfest? Best Regards, Shenhao Wang -Original Message- From: Wang, Shenhao Sent: Sunday, January 10, 2021 8:58

RE: invalid data in file backup_label problem on windows

2021-01-14 Thread Wang, Shenhao
Hi, Michael >Please feel free to, under the section "Bug fixes". This way, it >won't get lost in the traffic of this list. >-- >Michael Thank you for your advise, added it Best Regards, Shenhao Wang

parse mistake in ecpg connect string

2021-02-04 Thread Wang, Shenhao
Hi, hacker I found in function ECPGconnect, the connect string in comment is written as: /*-- * new style: * :postgresql://server[:port|:/unixsocket/path:] * [/db-name][?options] *-- */ But, the parse logical seems wrong, like: tmp = strrchr(dbname + offset, ':'); tmp2 = s

RE: parse mistake in ecpg connect string

2021-02-08 Thread Wang, Shenhao
Hi, Horiguchi-san, Kuroda-san: Thank you for reviewing. Kyotaro Horiguchi wrote: >FWIW, directly embedding /unixsocket/path syntax in a URL is broken in >the view of URI. It is the reason why the current connection URI takes >the way shown above. So I think we want to remove that code rather >t

RE: parse mistake in ecpg connect string

2021-02-08 Thread Wang, Shenhao
Hi, Horiguchi-san Kyotaro Horiguchi wrote: > How about the attached? I think, this patch is good. > > > Should we allow "::1" here as well? On the other hand, colons are > > > already overloaded in this syntax, so maybe allowing them in the > > > host part is a bad idea. > Yeah, that made me

handle a ECPG_bytea typo

2020-07-24 Thread Wang, Shenhao
Hi, hackers The source looks like: case ECPGt_bytea: { struct ECPGgeneric_varchar *variable = (struct ECPGgeneric_varchar *) (var->value); .. } I think the developer intend to use struct ECPGgeneric_bytea instead of str

[PATCH] Tab completion for CREATE OR REPLACE

2019-08-21 Thread Wang, Shenhao
Hello, hackers: I created a patch about tab completion for command CREATE OR REPLACE in psql includes: CREATE [ OR REPLACE ] FUNCTION CREATE [ OR REPLACE ] PROCEDURE CREATE [ OR REPLACE ] LANGUAGE CREATE [ OR REPLACE ] RULE name AS ON event CREATE [ OR REPLA

copyright problem in REL_13_STABLE

2020-09-11 Thread Wang, Shenhao
Hi hackers: In file src/backend/catalog/pg_cast.c in branch REL_13_STABLE(also in branch master) https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/backend/catalog/pg_cast.c;h=5ea2b82b08347c2a82b8d1a4588e4530f92e;hb=refs/heads/REL_13_STABLE the copyright is still Portions Copyr

make MaxBackends available in _PG_init

2020-09-20 Thread Wang, Shenhao
Hi Hackers: I find the value in function _PG_init, the value of MaxBackends is 0. In source, I find that the postmaster will first load library, and then calculate the value of MaxBackends. In the old version, the MaxBackends was calculated by: MaxBackends = MaxConnections + autovacuum_

a problem about XLogReader callback system

2020-09-27 Thread Wang, Shenhao
Hi, hackers I have a problem about XLogReader callback system In xlog.c, function StartupXLOG xlogreader = XLogReaderAllocate(wal_segment_size, NULL, XL_ROUTINE(.page_read = &XLogPageRead,