Re: Using LibPq in TAP tests via FFI

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: Using LibPq in TAP tests via FFI
Дата
Msg-id a0d25b9b-3c4f-4205-80f1-79cd007877b2@dunslane.net
обсуждение исходный текст
Ответ на Re: Using LibPq in TAP tests via FFI  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: Using LibPq in TAP tests via FFI
Список pgsql-hackers
On 2024-06-17 Mo 10:01 AM, Andrew Dunstan wrote:
>
>>
>>> I agree with you that falling back on BackgroundPsql is not a terribly
>>> satisfactory solution.
>> I'm somewhat doubtful we'll just agree on making FFI::Platypus a hard
>> dependency, but if we agree to do so...
>>
>>
>
> Maybe not. If so your other suggestion of a small XS wrapper might 
> make sense.


Here's the latest version of this patch. It removes all use of 
background_psql(). Instead it uses libpq's async interface, which seems 
to me far more robust. There is one remaining use of interactive_psql(), 
but that's reasonable as it's used for testing psql itself.

I spent yesterday creating an XS wrapper for just the 19 libpq functions 
used in Session.pm. It's pretty simple. I have it passing a very basic 
test, but haven't tried plugging it into Session.pm yet.


cheers


andrew



--
Andrew Dunstan
EDB: https://www.enterprisedb.com

Вложения

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