Hi Amit,
Thank you for your review. I’ve rebased and updated the patch. Please find attached the patch.
> Code Review comments:
> ---------------------
>
> 1. Modify the comment in function header of: parse_slash_copy (needs to modify for new syntax)
Done.
> 2. Comments for functions OpenPipeStream & ClosePipeStream are missing.
Done.
> 3. Any Script errors are not directly visible to user; If there problems in script no way to cleanup.
> Shouldn’t this be mentioned in User Manual.
Done. Please see the documentation note on the \copy instruction in psql-ref.sgml.
> Test case issues:
> ------------------
> 1. "Broken pipe" is not handled in case of psql "\copy" command;
> Issue are as follows:
> Following are verified on SuSE-Linux 10.2.
> 1) psql is exiting when "\COPY xxx TO" command is issued and command/script is not found
> When popen is called in write mode it is creating valid file descriptor and when it tries to write to file "Broken pipe" error is > coming which is not handled.
> psql# \copy pgbench_accounts TO PROGRAM '../compress.sh pgbench_accounts4.txt'
> 2) When "\copy" command is in progress then program/command is killed/"crashed due to any problem"
> psql is exiting.
This is a headache. I have no idea how to solve this.
Sorry for the long delay in responding.
Best regards,
Etsuro Fujita