Re: Can I test Extended Query in core test framework

From: Andy Fan <zhihui(dot)fan1213(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Can I test Extended Query in core test framework
Date: 2020-08-12 02:38:45
Message-ID: CAKU4AWp=OYNo6sjgFgbMV7rT=K67xmPwEScMEVd_9nqbXYri+w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Aug 11, 2020 at 11:22 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Andy Fan <zhihui(dot)fan1213(at)gmail(dot)com> writes:
> > I want to write some test cases with extended query in core test system.
>
> Why? (That is, what is it you need to test exactly?)
>
>
Thanks for your attention. The background is I hacked exec_bind_message[1],
then I want to add some test cases to make sure the logic can be tested
automatically
in the core system. I can't distinguish if the logic might be so straight
or not so it
doesn't deserve the test in practice.

psql has no ability to issue extended queries AFAIR, so the normal
> regression test scripts can't exercise this. We haven't built anything
> for it in the TAP infrastructure either. We do have test coverage
> via pgbench and ecpg, though I concede that's pretty indirect.
>
> I recall someone (Andres, possibly) speculating about building a tool
> specifically to exercise low-level protocol issues, but that hasn't
> been done either.
>

Thanks for this information. and Thanks Andres for the idea and practice.

>
> None of these are necessarily germane to any particular test requirement,
> which is why I'm wondering. The JDBC fragment you show seems like it's
> something that should be tested by, well, JDBC. What's interesting about
> it for any other client?
>
>
The main purpose is I want to test it in core without other infrastructure
involved.
I have added a python script to do that now. So the issue is not so
blocking.
but what I am working on[1] is still challenging for me:(

[1]
https://www.postgresql.org/message-id/CAKU4AWqvwmo=NLPGa_OHXB4F+u4Ts1_3YRy9M6XTjLt9DKHvvg@mail.gmail.com

--
Best Regards
Andy Fan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message tsunakawa.takay@fujitsu.com 2020-08-12 02:57:58 RE: Can I test Extended Query in core test framework
Previous Message Andy Fan 2020-08-12 02:33:31 Re: Allows Extend Protocol support CURSOR_OPT_HOLD with prepared stmt.