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

From: Mahendra Singh Thalor <mahi6run(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>
Subject: 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 12:25:54
Message-ID: CAKYtNApO30tdtRfe6rJK59pj6Mr=xW8hQELJ8+Vz95goHk3pQg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

--
Thanks and Regards
Mahendra Singh Thalor
EnterpriseDB: http://www.enterprisedb.com

Attachment Content-Type Size
v01_move-create-dir-code-to-the-switch-in-pg_backup_dir.patch application/octet-stream 3.3 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Álvaro Herrera 2025-04-07 12:30:59 Re: Restrict publishing of partitioned table with a foreign table as partition
Previous Message Jim Jones 2025-04-07 12:25:52 Re: [PATCH] Add CANONICAL option to xmlserialize