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