Re: no test coverage for ALTER FOREIGN DATA WRAPPER name HANDLER ...

From: Mark Dilger <hornschnorter(at)gmail(dot)com>
To: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: no test coverage for ALTER FOREIGN DATA WRAPPER name HANDLER ...
Date: 2017-05-09 13:52:18
Message-ID: F980BFC3-78C5-47B2-8904-CF6739415BD2@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> On May 9, 2017, at 12:18 AM, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> wrote:
>
> Hi,
>
> On 2017/05/05 9:38, Mark Dilger wrote:
>> Hackers,
>>
>> just FYI, I cannot find any regression test coverage of this part of the grammar, not
>> even in the contrib/ directory or TAP tests. I was going to submit a patch to help out,
>> and discovered it is not so easy to do, and perhaps that is why the coverage is missing.
>
> I think we could add the coverage by defining a dummy C FDW handler
> function in regress.c. I see that some other regression tests use C
> functions defined there, such as test_atomic_ops().
>
> What do you think about the attached patch? I am assuming you only meant
> to add tests for the code in foreigncmds.c (CREATE/ALTER FOREIGN DATA
> WRAPPER).

Thank you for creating the patch. I only see one small oversight, which is the
successful case of ALTER FOREIGN DATA WRAPPER ... HANDLER ... is still
not tested. I added one line for that in the attached modification of your patch.

Mark Dilger

Attachment Content-Type Size
0002-Add-some-FDW-HANDLER-DDL-tests.patch application/octet-stream 6.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nikolay Shaplov 2017-05-09 13:54:03 Re: pgbench tap tests & minor fixes
Previous Message Tom Lane 2017-05-09 13:36:56 Re: Should pg_current_wal_location() become pg_current_wal_lsn()