Re: CopyFrom() has become way too complicated - Mailing list pgsql-hackers

From Corey Huinker
Subject Re: CopyFrom() has become way too complicated
Date
Msg-id CADkLM=evWUdD7G=_demV1JgBuYUYkmsszjtw6c0Oq0_hSJqV=g@mail.gmail.com
Whole thread Raw
In response to CopyFrom() has become way too complicated  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
I think the code needs to be split up so that CopyFrom() in the loop
body calls CopyFromOneTuple(), which then also splits out the tuple
routing into its own CopyFromOneTupleRoute() function (that's 200 LOC on
its own...). I suspect it'd also be good to refactor the
partition-change code out into its own function.

+1
I had a hard time with this when doing my copy_srf() misadventure. 

pgsql-hackers by date:

Previous
From: James Coleman
Date:
Subject: Re: Error handling expectations
Next
From: Tom Lane
Date:
Subject: Re: Index-only scan returns incorrect results when using a composite GIST index with a gist_trgm_ops column.