Re: Remove useless tests about TRUNCATE on foreign table

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Remove useless tests about TRUNCATE on foreign table
Date: 2022-05-30 08:08:10
Message-ID: YpR7akFZE8LBA/H/@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, May 27, 2022 at 05:25:43PM +0900, Yugo NAGATA wrote:
> --- TRUNCATE doesn't work on foreign tables, either directly or recursively
> -TRUNCATE ft2; -- ERROR
> -ERROR: foreign-data wrapper "dummy" has no handler
> -TRUNCATE fd_pt1; -- ERROR
> -ERROR: foreign-data wrapper "dummy" has no handler
> DROP TABLE fd_pt1 CASCADE;

In the case of this test, fd_pt1 is a normal table that ft2 inherits,
so this TRUNCATE command somewhat checks that the TRUNCATE falls back
to the foreign table in this case. However, this happens to be tested
in postgres_fdw (see around tru_ftable_parent),

> --- TRUNCATE doesn't work on foreign tables, either directly or recursively
> -TRUNCATE fd_pt2_1; -- ERROR
> -ERROR: foreign-data wrapper "dummy" has no handler
> -TRUNCATE fd_pt2; -- ERROR
> -ERROR: foreign-data wrapper "dummy" has no handler

Partitions have also some coverage as far as I can see, so I agree
that it makes little sense to keep the tests you are removing here.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message shiy.fnst@fujitsu.com 2022-05-30 08:13:07 RE: Hash index build performance tweak from sorting
Previous Message Michael Paquier 2022-05-30 07:48:22 Re: Remove support for Visual Studio 2013