mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
file_fdw: Fix for generated columns
Since file_fdw uses COPY internally, but COPY doesn't allow listing generated columns in its column list, we need to make sure that we don't add generated columns to the column lists internally generated by file_fdw. Reported-by: Erik Rijkers <er@xs4all.nl>
This commit is contained in:
@ -922,6 +922,10 @@ check_selective_binary_conversion(RelOptInfo *baserel,
|
||||
/* Skip dropped attributes (probably shouldn't see any here). */
|
||||
if (attr->attisdropped)
|
||||
continue;
|
||||
/* Skip generated columns (COPY won't accept them in the column
|
||||
* list) */
|
||||
if (attr->attgenerated)
|
||||
continue;
|
||||
*columns = lappend(*columns, makeString(pstrdup(attname)));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user