From: | Surafel Temesgen <surafel3000(at)gmail(dot)com> |
---|---|
To: | dean(dot)a(dot)rasheed(at)gmail(dot)com |
Cc: | tomas(dot)vondra(at)2ndquadrant(dot)com, Adam Berlin <berlin(dot)ab(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: COPY FROM WHEN condition |
Date: | 2018-11-26 13:05:15 |
Message-ID: | CALAY4q89dk4ZN-ZZGrP-O_jZDHJyJv4K_b47c-4Bg8242u7UZQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, Nov 24, 2018 at 12:02 PM Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
wrote:
> Right now we have 2 syntaxes for filtering rows in queries, both of
> which use WHERE immediately before the condition:
>
> 1). SELECT ... FROM ... WHERE condition
>
> 2). SELECT agg_fn FILTER (WHERE condition) FROM ...
>
> I'm not a huge fan of (2), but that's the SQL standard, so we're stuck
> with it. There's a certain consistency in it's use of WHERE to
> introduce the condition, and preceding that with FILTER helps to
> distinguish it from any later WHERE clause. But what you'd be adding
> here would be a 3rd syntax
>
> 3). COPY ... FROM ... FILTER condition
>
> which IMO will just lead to confusion.
>
your case is for retrieving data but this is for deciding which data to
insert and word FILTER I think describe it more and not lead to confusion.
regards
Surafel
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2018-11-26 13:06:36 | Re: pgsql: Integrate recovery.conf into postgresql.conf |
Previous Message | Michael Paquier | 2018-11-26 13:02:12 | Re: A WalSnd issue related to state WALSNDSTATE_STOPPING |