Re: COPY FROM WHEN condition
Corey Huinker <corey.huinker@gmail.com>
From: Corey Huinker <corey.huinker@gmail.com>
To: surafel3000@gmail.com
Cc: cmt@burggraben.net, pgsql-hackers@lists.postgresql.org
Date: 2018-10-11T09:12:48Z
Lists: pgsql-hackers
On Thu, Oct 11, 2018 at 5:04 AM Surafel Temesgen <surafel3000@gmail.com> wrote: > > > On Thu, Oct 11, 2018 at 12:00 PM Christoph Moench-Tegeder < > cmt@burggraben.net> wrote: > >> You can: >> COPY ( query ) TO 'filename'; >> > it is for COPY FROM > > regards > Surafel > It didn't get far, but you may want to take a look at a rejected patch for copy_srf() (set returning function) https://www.postgresql.org/message-id/CADkLM%3DdoeiWQX4AGtDNG4PsWfSXz3ai7kY%3DPZm3sUhsUeev9Bg%40mail.gmail.com https://commitfest.postgresql.org/12/869/ Having a set returning function gives you the full expressiveness of SQL, at the cost of an extra materialization step.
Commits
-
Remove unused struct member, enforce multi_insert callback presence.
- 57a7a3adfe4e 12.0 landed
-
Separate per-batch and per-tuple memory contexts in COPY
- 36a1281f86c0 12.0 landed
-
Fix handling of volatile expressions in COPY FROM ... WHERE
- 4a8283d0ec5a 12.0 landed
-
Allow COPY FROM to filter data using WHERE conditions
- 31f3817402da 12.0 landed
-
Remove obsolete netbsd dynloader code
- b68ff3ea672c 12.0 cited