RE: COPY FROM WHEN condition

Поиск
Список
Период
Сортировка
От myungkyu.lim
Тема RE: COPY FROM WHEN condition
Дата
Msg-id 007e01d47a5b$9747ba60$c5d72f20$@samsung.com
обсуждение исходный текст
Ответ на Re: COPY FROM WHEN condition  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Список pgsql-hackers
>> 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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: New function pg_stat_statements_reset_query() to reset statisticsof a specific query
Следующее
От: John Naylor
Дата:
Сообщение: doc fix for pg_stat_activity.backend_type