pset_quoted_string is broken

Поиск
Список
Период
Сортировка
От David Rowley
Тема pset_quoted_string is broken
Дата
Msg-id CAApHDvrvbkpn6BVWCnDEfE2v+kgRmNgcpmL3rF7d-+-PnwMTcg@mail.gmail.com
обсуждение исходный текст
Ответы Re: pset_quoted_string is broken
Список pgsql-hackers
It seems the buffer created in pset_quoted_string is just 1 char too small.

This breaks psql's \pset for me, though I've no idea why the buildfarm is not complaining a bit more.

As it stands, if the function is given an empty string to quote, it tries to build a string with 2 single quotes and a NUL. This needs 3 chars, not 2.

The attached simple patch fixes the problem.
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Noah Misch
Дата:
Сообщение: Re: narwhal and PGDLLIMPORT
Следующее
От: Tom Lane
Дата:
Сообщение: Re: narwhal and PGDLLIMPORT