Re: a proposal for a new functionality: "SELECT * [EXCEPT col1 [,col2]]

Поиск
Список
Период
Сортировка
От Paul A Jungwirth
Тема Re: a proposal for a new functionality: "SELECT * [EXCEPT col1 [,col2]]
Дата
Msg-id CA+renyWW_wjY7Qsis6fHJL_VQj=274aRD2Tb-k_QYe=aNwEing@mail.gmail.com
обсуждение исходный текст
Ответ на Re: a proposal for a new functionality: "SELECT * [EXCEPT col1 [,col2]]  (Miles Elam <miles.elam@productops.com>)
Ответы Re: a proposal for a new functionality: "SELECT * [EXCEPT col1[,col2]]
Re: a proposal for a new functionality: "SELECT * [EXCEPT col1[,col2]]
Список pgsql-general
On Tue, Feb 25, 2020 at 2:18 AM Stanislav Motyčka
<stanislav.motycka@gmail.com> wrote:
> Sometimes (for tables with many columns) it would be better and easier to write "SELECT" statement with clause
"EXCEPT":
> "SELECT * [EXCEPT col1 [,col2]] FROM ..."

I've wanted this feature lots of times and would be delighted to see
it in Postgres.

On Tue, Feb 25, 2020 at 6:51 AM Miles Elam <miles.elam@productops.com> wrote:
> Do you mean
>   "select everything from tablex except for tablex.col1, and also select tablex.col2 and tabley.col1"
> or
>   "select everything from tablex except for tablex.col1 AND tablex.col2, and also select tabley.col1"
> ?

I take the proposal to mean this:

SELECT listOfColumns [EXCEPT listOfColumns] FROM ...

not this:

SELECT listOfColumns [EXCEPT (listOfColumns) [listOfColumns [EXCEPT
(listOfColumns)]]]... FROM ...

So there is always a single EXCEPT clause (if any) and it comes after
the entire SELECT clause. Then there is no ambiguity. Also this
approach makes the feature easy to understand and use. I don't see any
benefit to letting people interleave selected & excepted columns.

Regards,
Paul



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

Предыдущее
От: Dipanjan Ganguly
Дата:
Сообщение: Re: Connections dropping while using Postgres backend DB with Ejabberd
Следующее
От: Justin
Дата:
Сообщение: Re: Connections dropping while using Postgres backend DB with Ejabberd