pgsql: Code review for psql's helpSQL() function.

2021-01-26 Thread Tom Lane
Code review for psql's helpSQL() function. The loops to identify word boundaries could access past the end of the input string. Likely that would never result in an actual crash, but it makes valgrind unhappy. The logic to try different numbers of words didn't work when the input has two words b

pgsql: Code review for psql's helpSQL() function.

2021-01-26 Thread Tom Lane
Code review for psql's helpSQL() function. The loops to identify word boundaries could access past the end of the input string. Likely that would never result in an actual crash, but it makes valgrind unhappy. The logic to try different numbers of words didn't work when the input has two words b

pgsql: Code review for psql's helpSQL() function.

2021-01-26 Thread Tom Lane
Code review for psql's helpSQL() function. The loops to identify word boundaries could access past the end of the input string. Likely that would never result in an actual crash, but it makes valgrind unhappy. The logic to try different numbers of words didn't work when the input has two words b

pgsql: Code review for psql's helpSQL() function.

2021-01-26 Thread Tom Lane
Code review for psql's helpSQL() function. The loops to identify word boundaries could access past the end of the input string. Likely that would never result in an actual crash, but it makes valgrind unhappy. The logic to try different numbers of words didn't work when the input has two words b

pgsql: Code review for psql's helpSQL() function.

2021-01-26 Thread Tom Lane
Code review for psql's helpSQL() function. The loops to identify word boundaries could access past the end of the input string. Likely that would never result in an actual crash, but it makes valgrind unhappy. The logic to try different numbers of words didn't work when the input has two words b

pgsql: Code review for psql's helpSQL() function.

2021-01-26 Thread Tom Lane
Code review for psql's helpSQL() function. The loops to identify word boundaries could access past the end of the input string. Likely that would never result in an actual crash, but it makes valgrind unhappy. The logic to try different numbers of words didn't work when the input has two words b

pgsql: Code review for psql's helpSQL() function.

2021-01-26 Thread Tom Lane
Code review for psql's helpSQL() function. The loops to identify word boundaries could access past the end of the input string. Likely that would never result in an actual crash, but it makes valgrind unhappy. The logic to try different numbers of words didn't work when the input has two words b