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

From Mahendra Singh Thalor
Subject Re: as per commit 643a1a61985bef2590496, move create/open dir code to function using switch case of pg_backup_directory.c file also
Date
Msg-id CAKYtNAq3Howw6Y1vPOdeWoa+OcWDo73WBjMzdMkP0uT5pk+z6A@mail.gmail.com
Whole thread Raw
In response to Re: as per commit 643a1a61985bef2590496, move create/open dir code to function using switch case of pg_backup_directory.c file also  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
On Thu, 10 Apr 2025 at 21:48, Andrew Dunstan <andrew@dunslane.net> wrote:
>
>
> On 2025-04-07 Mo 2:59 PM, Mahendra Singh Thalor wrote:
> > On Mon, 7 Apr 2025 at 18:52, Andrew Dunstan <andrew@dunslane.net> wrote:
> >>
> >> 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.
> > Thanks Andrew.
> >
> > I moved this common function dumputils.c file. Here, I am attaching a
> > patch for the same.
> >
> >
>
>
> Pushed with a slight tweaking.
>
>
> cheers
>
>
> andrew
>
> --
> Andrew Dunstan
> EDB: https://www.enterprisedb.com
>

Thanks Andrew for committing this.

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



pgsql-hackers by date:

Previous
From: Mahendra Singh Thalor
Date:
Subject: merge file_exists_in_directory and _fileExistsInDirectory functions and move into common file dumputils.c
Next
From: Mahendra Singh Thalor
Date:
Subject: Re: Non-text mode for pg_dumpall