The attached patch (against HEAD) implements
Bruce Momjian <bruce@momjian.us>
The attached patch (against HEAD) implements COPY x (a,d,c,b) from stdin; COPY x (a,c) to stdout; as well as the corresponding changes to pg_dump to use the new functionality. This functionality is not available when using the BINARY option. If a column is not specified in the COPY FROM statement, its default values will be used. In addition to this functionality, I tweaked a couple of the error messages emitted by the new COPY <options> checks. Brent Verner
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/ref/copy.sgml | modified | +22 −2 |
| src/backend/commands/copy.c | modified | +176 −42 |
| src/backend/parser/gram.y | modified | +13 −12 |
| src/backend/rewrite/rewriteHandler.c | modified | +2 −3 |
| src/bin/pg_dump/pg_dump.c | modified | +47 −7 |
| src/include/nodes/parsenodes.h | modified | +2 −1 |
| src/include/rewrite/rewriteHandler.h | modified | +2 −2 |
| src/test/regress/parallel_schedule | modified | +1 −1 |
| src/test/regress/serial_schedule | modified | +2 −1 |