pgsql: file_fdw: Fix ANALYZE crashes with DEFAULT markers
pgsql: file_fdw: Fix ANALYZE crashes with DEFAULT markers
От:
Fujii Masao <fujii@postgresql.org>
Дата:
file_fdw: Fix ANALYZE crashes with DEFAULT markers ANALYZE on a file_fdw foreign table failed an assertion when the input contained a DEFAULT marker, and could crash in builds without assertions. This happened because the sampling code passed a NULL ExprContext to NextCopyFrom(), which requires one to evaluate column defaults. Fix this by providing an expression context for sampling, allowing defaults to be evaluated without assertion failures or crashes. Backpatch to v16, which introduced DEFAULT marker support. Author: Fujii Masao Reviewed-by: Jim Jones Reviewed-by: Ayoub Kazar Reviewed-by: Chao Li Discussion: https://postgr.es/m/CAHGQGwGwihFV9FmfSbbrMsEr4fti7aHZFkpyMv5-byjfc2EmOw@mail.gmail.com Backpatch-through: 16 Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/813a74bc5a76f13c15da902f5523d0fa755e2c5f Modified Files -------------- contrib/file_fdw/expected/file_fdw.out | 10 ++++++++++ contrib/file_fdw/file_fdw.c | 24 +++++++++++++----------- contrib/file_fdw/sql/file_fdw.sql | 5 +++++ 3 files changed, 28 insertions(+), 11 deletions(-)