Memory leak using when using libpq PQExecParams() CRYPTO_zalloc()

2023-02-22 Thread Michael Arnold
Hi, Am looking for guidance on how to fix a memory leak when using libpq PQExecParams(). Memory leaks through CRYPTO_zalloc() and arises when using json_agg(). None-JSON based PQExecParams() calls are not leaking. Using Postgresql 13.6 (Ubuntu 13.6-0ubuntu0.21.10.1) on x86_64-pc-linux-gnu, comp

Re: Postgres Date Type Value

2022-12-17 Thread Michael Arnold
com> wrote: > On Sat, Dec 17, 2022 at 4:55 PM Michael Arnold wrote: > >> How do I interpret the 4 bytes of postgresql 'date' value? >> > See date2j and j2date in datetime.c > > timestamp.h has the relevant constant Tom refers to (POSTGRES_EPOCH_JDATE) > > > David J. > >

Postgres Date Type Value

2022-12-17 Thread Michael Arnold
Want to retrieve a date type from a postgres table using libpq PQexecParams() in binary mode (please humor me). https://www.postgresql.org/docs/14/datatype-datetime.html says that a date is 4 bytes (4713 BC to 5874897 AD). src/include/utils/date.h defines: typedef int32 DateADT; Something like