RE: COPY FROM WHEN condition

From: "myungkyu(dot)lim" <myungkyu(dot)lim(at)samsung(dot)com>
To: "'Tomas Vondra'" <tomas(dot)vondra(at)2ndquadrant(dot)com>, "'Surafel Temesgen'" <surafel3000(at)gmail(dot)com>, "'PostgreSQL Hackers'" <pgsql-hackers(at)postgresql(dot)org>
Subject: RE: COPY FROM WHEN condition
Date: 2018-10-29 04:12:20
Message-ID: 009901d46f3d$9694cf50$c3be6df0$@samsung.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello,

Basically, this patch worked very well in my tests.

> 3) For COPY TO, the WHEN clause is accepted but ignored, leading to confusing cases like this:

I found same issue.

postgres=# copy t1 to '/home/lmk/t1.data' when c1 < 1;

In the 'COPY TO' statement, 'WHEN clause' does not do any extra work.
(include error or hint)

> 4) There are some minor code style issues in copy.c - the variable is misnamed as when_cluase, there are no spaces after 'if' etc. See the attached patch fixing this.

It is recommended to use 'pg tool' when you finish development.

src/tools/pgindent/pgindent

pgindent is used to fix the source code style to conform to pg standards.

Best regards,
Myungkyu, Lim

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Haribabu Kommi 2018-10-29 04:55:49 Re: Pluggable Storage - Andres's take
Previous Message Pavel Stehule 2018-10-29 04:02:53 why commutator doesn't work?