Re: Add BufFileRead variants with short read and EOF detection

2023-01-16 Thread Peter Eisentraut
On 14.01.23 07:01, Amit Kapila wrote: On Thu, Jan 12, 2023 at 2:44 PM Peter Eisentraut wrote: On 10.01.23 07:20, Amit Kapila wrote: Yeah, we can do that but not sure if it is worth doing any of those because there are already other places that don't use the exact context. Ok, updated

Re: Add BufFileRead variants with short read and EOF detection

2023-01-13 Thread Amit Kapila
On Thu, Jan 12, 2023 at 2:44 PM Peter Eisentraut wrote: > > On 10.01.23 07:20, Amit Kapila wrote: > > Yeah, we can do that but not sure if it is worth doing any of those > > because there are already other places that don't use the exact > > context. > > Ok, updated patches attached. > Both the

Re: Add BufFileRead variants with short read and EOF detection

2023-01-12 Thread Peter Eisentraut
BufFileClose(fd); } base-commit: c8ad4d8166aabd6ed5124e7e432166637d0fe646 -- 2.39.0 From 03d64c2e7a4d8f869fadff52d184f8d1373a98e2 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Fri, 6 Jan 2023 12:13:49 +0100 Subject: [PATCH v3 2/2] Add BufFileRead variants with short read and E

Re: Add BufFileRead variants with short read and EOF detection

2023-01-09 Thread Amit Kapila
On Fri, Jan 6, 2023 at 6:18 PM Peter Eisentraut wrote: > > On 02.01.23 13:13, Amit Kapila wrote: > > On Wed, Dec 28, 2022 at 4:17 PM Peter Eisentraut > > wrote: > >> > >> Most callers of BufFileRead() want to check whether they read the full > >> specified length. Checking this at every call

Re: Add BufFileRead variants with short read and EOF detection

2023-01-06 Thread Peter Eisentraut
ile \"%s\": read only %zu of %zu bytes", + path, nread, len))); + } BufFileClose(fd); } base-commit: 72aea955d49712a17c08748aa9abcbcf98c32fc5 -- 2.39.0 From 34f1df4fbd6dda2e3b0a434e4aa4a080f52799c8 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Da

Re: Add BufFileRead variants with short read and EOF detection

2023-01-03 Thread vignesh C
On Wed, 28 Dec 2022 at 16:17, Peter Eisentraut wrote: > > Most callers of BufFileRead() want to check whether they read the full > specified length. Checking this at every call site is very tedious. > This patch provides additional variants BufFileReadExact() and > BufFileReadMaybeEOF() that

Re: Add BufFileRead variants with short read and EOF detection

2023-01-02 Thread Amit Kapila
On Wed, Dec 28, 2022 at 4:17 PM Peter Eisentraut wrote: > > Most callers of BufFileRead() want to check whether they read the full > specified length. Checking this at every call site is very tedious. > This patch provides additional variants BufFileReadExact() and > BufFileReadMaybeEOF() that

Add BufFileRead variants with short read and EOF detection

2022-12-28 Thread Peter Eisentraut
Date: Wed, 28 Dec 2022 11:46:14 +0100 Subject: [PATCH] Add BufFileRead variants with short read and EOF detection Most callers of BufFileRead() want to check whether they read the full specified length. Checking this at every call site is very tedious. This patch provides additional variants