Re: Additional minor pg_dump cleanups

2024-07-04 Thread Ranier Vilela
Em qui., 4 de jul. de 2024 às 05:18, Daniel Gustafsson escreveu: > > On 3 Jul 2024, at 13:29, Ranier Vilela wrote: > > > With the function *getPublications* I think it would be good to free up > the allocated memory? > > > > } > > + pg_free(pubinfo); > > +cleanup: > > PQclear(res)

Re: Additional minor pg_dump cleanups

2024-07-04 Thread Daniel Gustafsson
> On 3 Jul 2024, at 13:29, Ranier Vilela wrote: > With the function *getPublications* I think it would be good to free up the > allocated memory? > > } > + pg_free(pubinfo); > +cleanup: > PQclear(res); Since the pubinfo is recorded in the DumpableObject and is responsible for k

Re: Additional minor pg_dump cleanups

2024-07-03 Thread Ranier Vilela
Em qua., 3 de jul. de 2024 às 04:37, Daniel Gustafsson escreveu: > Re-reading Nathans recent 8213df9effaf I noticed a few more small things > which > can be cleaned up. In two of the get functions we lack a > fast-path for > when no tuples are found which leads to pg_malloc(0) calls. Another th

Additional minor pg_dump cleanups

2024-07-03 Thread Daniel Gustafsson
Re-reading Nathans recent 8213df9effaf I noticed a few more small things which can be cleaned up. In two of the get functions we lack a fast-path for when no tuples are found which leads to pg_malloc(0) calls. Another thing is that we in one place reset the PQExpBuffer immediately after creating