agora inbox for pgsql-hackers@postgresql.org  
help / color / mirror / Atom feed
From: myungkyu.lim <myungkyu.lim@samsung.com>
To: 'Tomas Vondra' <tomas.vondra@2ndquadrant.com>
To: 'Surafel Temesgen' <surafel3000@gmail.com>
To: 'PostgreSQL Hackers' <pgsql-hackers@postgresql.org>
Subject: RE: COPY FROM WHEN condition
Date: Mon, 29 Oct 2018 13:12:20 +0900
Message-ID: <009901d46f3d$9694cf50$c3be6df0$@samsung.com> (raw)
In-Reply-To: <b87e80a4-15dc-079c-d3d4-41ce03f55480@2ndquadrant.com>
References: <CALAY4q_DdpWDuB5-Zyi-oTtO2uSk8pmy+dupiRe3AvAc++1imA@mail.gmail.com>
	<CGME20181028162024epcas3p221218de77c20e62e5030c0e1c0a68dc0@epcas3p2.samsung.com>
	<b87e80a4-15dc-079c-d3d4-41ce03f55480@2ndquadrant.com>

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





view thread (90+ messages)  latest in thread

Message-ID: <009901d46f3d$9694cf50$c3be6df0$@samsung.com>
Permalink:  ../009901d46f3d$9694cf50$c3be6df0$@samsung.com/
Also on:    postgresql.org/message-id/009901d46f3d$9694cf50$c3be6df0$@samsung.com

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: myungkyu.lim@samsung.com, tomas.vondra@2ndquadrant.com, surafel3000@gmail.com
  Subject: RE: COPY FROM WHEN condition
  In-Reply-To: <009901d46f3d$9694cf50$c3be6df0$@samsung.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox