Re: as per commit 643a1a61985bef2590496, move create/open dir code to function using switch case of pg_backup_directory.c file also

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Mahendra Singh Thalor <mahi6run(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: as per commit 643a1a61985bef2590496, move create/open dir code to function using switch case of pg_backup_directory.c file also
Date: 2025-04-07 13:22:56
Message-ID: 13b8f505-b7a3-4910-a923-9f56e80d390e@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 2025-04-07 Mo 8:25 AM, Mahendra Singh Thalor wrote:
> Hi,
> In commit 643a1a61985bef2590496, we did some cleanup and we replaced
> if-else with switch case.
> Basically, we made a function to open a directory in pg_dumpall.
> In pg_backup_directory.c file also, we are opening a directory with
> if-else.
> Here, I am attaching a patch which makes both the files similar.
>
> We can move this similar function into one common file also but as of
> now, I made a static function same as pg_dumpall.c.

Yeah, let's put it in a common file. There's no point in duplicating it.

cheers

andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2025-04-07 13:38:30 Re: Add pg_buffercache_evict_all() and pg_buffercache_mark_dirty[_all]() functions
Previous Message Alexander Korotkov 2025-04-07 13:11:55 Re: Removing unneeded self joins