Re: pg_read_file() with virtual files returns empty string - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_read_file() with virtual files returns empty string
Date
Msg-id 811823.1593642171@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_read_file() with virtual files returns empty string  (Joe Conway <mail@joeconway.com>)
Responses Re: pg_read_file() with virtual files returns empty string  (Joe Conway <mail@joeconway.com>)
List pgsql-hackers
Joe Conway <mail@joeconway.com> writes:
> The only downside is that the max filesize is reduced to (MaxAllocSize -
> MIN_READ_SIZE - 1) compared to MaxAllocSize with the old method.

Hm, I was expecting that the last successful iteration of
enlargeStringInfo would increase the buffer size to MaxAllocSize,
so that we'd really only be losing one byte (which we can't avoid
if we use stringinfo).  But you're right that it's most likely moot
since later manipulations of such a result would risk hitting overflows.

I marked the CF entry as RFC.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Inlining of couple of functions in pl_exec.c improves performance
Next
From: Tom Lane
Date:
Subject: Re: POC: rational number type (fractions)