agora inbox for pgsql-hackers@postgresql.org
help / color / mirror / Atom feedFrom: myungkyu.lim <myungkyu.lim@samsung.com>
To: 'Tomas Vondra' <tomas.vondra@2ndquadrant.com>
To: 'Adam Berlin' <berlin.ab@gmail.com>
To: pgsql-hackers@lists.postgresql.org
Cc: 'Surafel Temesgen' <surafel3000@gmail.com>
Subject: RE: COPY FROM WHEN condition
Date: Mon, 12 Nov 2018 16:44:49 +0900
Message-ID: <007e01d47a5b$9747ba60$c5d72f20$@samsung.com> (raw)
In-Reply-To: <7f9880a1-416e-649d-3a5a-e36bff538814@2ndquadrant.com>
References: <CALAY4q_DdpWDuB5-Zyi-oTtO2uSk8pmy+dupiRe3AvAc++1imA@mail.gmail.com>
<c8cee82b-ae71-4153-a29f-fd6f15ff631f@manitou-mail.org>
<154177868369.24563.8425283889569429535.pgcf@coridan.postgresql.org>
<CGME20181111210314epcas3p37f33fdd3aa51069e737bb66cb47db97f@epcas3p3.samsung.com>
<7f9880a1-416e-649d-3a5a-e36bff538814@2ndquadrant.com>
>> COPY table_name WHERE (some_condition)
>>
>> Users should already be familiar with the idea that WHERE performs a filter.
>>
> So, what about using FILTER here? We already use it for aggregates when
> filtering rows to process.
> That being said, I have no strong feelings either way. I'd be OK with
> both WHEN and WHERE.
I don't think it's an important point,
In gram.y,
where_clause:
WHERE a_expr { $$ = $2; }
| /*EMPTY*/ { $$ = NULL; }
;
This is similar to the 'opt_when_clause' in this patch.
So, I think 'WHERE' is a better form.
BTW, 3rd patch worked very well in my tests.
However, some wrong code style still exists.
Node *whenClause= NULL;
cstate->whenClause=whenClause;
Best regards,
Myungkyu, Lim
view thread (90+ messages) latest in thread
Message-ID: <007e01d47a5b$9747ba60$c5d72f20$@samsung.com>
Permalink: ../007e01d47a5b$9747ba60$c5d72f20$@samsung.com/
Also on: postgresql.org/message-id/007e01d47a5b$9747ba60$c5d72f20$@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, berlin.ab@gmail.com, pgsql-hackers@lists.postgresql.org, surafel3000@gmail.com
Subject: RE: COPY FROM WHEN condition
In-Reply-To: <007e01d47a5b$9747ba60$c5d72f20$@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