Hacking PostgreSQL
Final Code
PostgreSQL Subsystems
Hacking the PostgreSQL Way
From an Idea..
Parser Changes
Command Code Changes
COPY productions
These are the other COPY productions
copy_from:
FROM { $$ = true; }
| TO { $$ = false; }
;
opt_program:
PROGRAM { $$ = true; }
| /EMPTY/ { $$ = false; }
;
...
copy_file_name:
Sconst { $$ = $1; }
| STDIN { $$ = NULL; }
| STDOUT { $$ = NULL; }
;
copy_options: copy_opt_list { $$ = $1; }
| '(' copy_generic_opt_list ')' { $$ = $2; }
;
...