https://docs.aws.amazon.com/redshift/latest/dg/r_UNLOAD.html Doing so will require patching the postgres source. Example commits and relevant code: - [Grammar entry point](https://github.com/postgres/postgres/blob/master/src/backend/parser/gram.y) - [kwlist.h](https://github.com/postgres/postgres/blob/master/src/include/parser/kwlist.h) - [MERGE implementation commit](https://github.com/postgres/postgres/commit/d204ef63776b8a00ca220adec23979091564e465) - [COPY statement](https://github.com/postgres/postgres/blob/b41669118c00e25376a6c9ac991e0d074990484a/src/backend/parser/gram.y#L2948-L3184) - [COPY logic](https://github.com/postgres/postgres/blob/5b0c7e2f757a2cbdd8e0c478de51bcb5606d3a93/src/backend/commands/copy.c)
https://docs.aws.amazon.com/redshift/latest/dg/r_UNLOAD.html
Doing so will require patching the postgres source.
Example commits and relevant code: