Re: [HACKERS] [PROPOSAL] Temporal query processing with range types

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: [HACKERS] [PROPOSAL] Temporal query processing with range types
Дата
Msg-id CANP8+j+yPfrCdr8n2_oXt+BWNbX=6UOGugQk-b0rxuXV1h+P4w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] [PROPOSAL] Temporal query processing with range types  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: [HACKERS] [PROPOSAL] Temporal query processing with range types
Re: [HACKERS] [PROPOSAL] Temporal query processing with range types
Список pgsql-hackers
On 30 November 2017 at 17:26, Robert Haas <robertmhaas@gmail.com> wrote:

> I wonder if we could instead think about R NORMALIZE S ON R.x = S.y
> WITH (R.time, S.time) as an ordinary join on R.x = S.y with some extra
> processing afterwards.

That would work nicely, kindof like a Projection, but one that can
vary the number of rows emitted.

For normal joins, we simply emit one row. For new style joins we call
a special PostJoinSetProjection function: one tuple in, potentially
many tuples out.

Peter, does Robert's proposed treatment give you what you need?


Overall, I like the goals expressed on this thread. I think if we
should focus on introducing useful new functionality, rather than
focusing on syntax.

I'm not very keen on adopting new syntax that isn't in the
SQLStandard. They have a bad habit of doing something completely
different. So a flexible approach will allow us to have functionality
now and we can adopt any new syntax later.

For any new syntax, I think the right approach would be to create a
new parser plugin. That way we could make all of this part of an
extension.
* a parser plugin for any new syntax
* various PostJoinSetProjection() functions to be called as needed
So the idea is we enable Postgres to allow major new functionality, as
was done for PostGIS so successfully.

We can adopt syntax into the main parser later once SQLStandard
accepts this, or some munged version of it.

-- 
Simon Riggs                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


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

Предыдущее
От: Ryan Murphy
Дата:
Сообщение: Re: Add default role 'pg_access_server_files'
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Condition variable live lock