> On Nov 3, 2026, at 08:33, surya poondla <[email protected]> wrote: > > Hi Chao, > > I tested v2 on current master (51ae21aa313). The code change looks fine to me.
Thank you very much for your review. > > One more argument for it, on master the file is opened, or the program is > run, before the relkind check fires. For example: > > create sequence s; > copy s from program 'touch /tmp/marker'; > ERROR: cannot copy to sequence "s" > > On master /tmp/marker gets created; with v2 it doesn't. And copy s from > '/nonexistent/file' fails with "could not open file" on master, but "cannot > copy to sequence" with v2. Might be worth a line in the commit message. Updated the comment message in v3. > > The copy2.sql change needs to be dropped, though. Since Tom's 3045a25ba81, > which went in after v2, psql skips the in-line data when COPY FROM STDIN > fails early. With test1 and . removed, psql now eats everything up to the > next ., i.e. the CREATE FUNCTION, CREATE TRIGGER and the next COPY, and copy2 > fails. If you keep those two lines, the expected output doesn't change. Reverted the change in copy2.sql. PFA v3. Best regards, -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/
v3-0001-Report-unsupported-COPY-FROM-targets-before-readi.patch
Description: Binary data
