Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...

Поиск
Список
Период
Сортировка
От Kirk Wolak
Тема Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...
Дата
Msg-id CACLU5mQvsAtPaYqjGEnj_w1AgXjJsYXeXvLtUvznKnfpec2k8w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...  (Andres Freund <andres@anarazel.de>)
Список pgsql-general
On Wed, Nov 23, 2022 at 9:32 PM Andres Freund <andres@anarazel.de> wrote:
Hi,

On 2022-11-23 20:55:18 -0500, Kirk Wolak wrote:
> Currently I have a lot of it working, but I need to partner up with some of
> the meson guys...
> if it is already close to working, a couple of my tweaks could accelerate
> it.

I just successfully compiled postgres with meson and readline, using msvc,
only tweaking psql_completion() contents.

The readline I used for building with msvc is from
vcpkg.exe install --triplet x64-windows readline-win32 pkgconf
...
# when running tests, the readline dll needs to be somewhere in PATH
$ENV:PATH="$ENV:PATH;c:/dev/vcpkg/installed/x64-windows/debug/bin"

Greetings,

Andres Freund
Andres,
  Thank you for this.  I Will dig into it.

  A note on using readline.dll... We have to be careful, this was one of the issues I had.
Readline uses it's own xmalloc() to allocate the line, and in our mainloop, we get that as "line",
and then we call free(line); which triggered Assertion Failures.  I've always thought it was not a
great pattern to allocate inside the DLL and free inside the application, unless you can
make sure you use the DLL to also do the free.

  I think it would be easy to be mismatched.

Regards Kirk

 

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...
Следующее
От: Kirk Wolak
Дата:
Сообщение: Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...