| From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
|---|---|
| To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Using LibPq in TAP tests via FFI |
| Date: | 2024-06-14 15:11:38 |
| Message-ID: | 997f67ac-cc02-4076-9fda-db465e89c622@dunslane.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 2024-06-14 Fr 11:09, Andrew Dunstan wrote:
> Over at [1] Andres expressed enthusiasm for enabling TAP tests to call
> LibPQ directly via FFI, and there was some support from others as
> well. Attached is a very rough POC for just that.There are two perl
> modules, one which wraps libpq (or almost all of it) in perl, and
> another which uses that module to create a session object that can be
> used to run SQL. Also in the patch is a modification of one TAP test
> (arbitrarily chosen as src/bin/pg_amcheck/t/004_verify_heapam.p) to
> use the new interface, so it doesn't use psql at all.
>
> There's a bunch of work to do here, but for a morning's work it's not
> too bad :-) Luckily I had most of the first file already to hand.
>
> Next I plan to look at some of the recovery tests and other uses of
> background_psql, which might be more challenging,a dn require
> extension of the session API. Also there's a lot of error checking and
> documentation that need to be added.
>
>
> cheers
>
>
> andrew
>
>
> [1]
> https://postgr.es/m/20240612152812.ixz3eiz2p475gose@awork3.anarazel.de
>
>
And here's the patch
cheers
andrew
--
Andrew Dunstan
EDB: https://www.enterprisedb.com
| Attachment | Content-Type | Size |
|---|---|---|
| pqffi-poc.patch | text/x-patch | 23.2 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrew Dunstan | 2024-06-14 15:15:04 | Re: RFC: adding pytest as a supported test framework |
| Previous Message | Andrew Dunstan | 2024-06-14 15:09:43 | Using LibPq in TAP tests via FFI |