Re: [HACKERS] ASOF join

2017-06-21 Thread Thomas Munro
On Wed, Jun 21, 2017 at 9:46 PM, Konstantin Knizhnik wrote: > Thank you for this idea. I agree that it is the best way of implementing > ASOF join - just as optimization of standard SQL query. Great. I think this part definitely has potential. > But do you think that

Re: [HACKERS] ASOF join

2017-06-21 Thread Thomas Munro
On Mon, Jun 19, 2017 at 11:57 PM, Konstantin Knizhnik wrote: > On 16.06.2017 19:07, David Fetter wrote: >> If you turn your head sideways, it's very similar to the range merge >> join Jeff Davis proposed. https://commitfest.postgresql.org/14/1106/ > > May be, but I do

Re: [HACKERS] ASOF join

2017-06-21 Thread Konstantin Knizhnik
On 21.06.2017 11:00, Thomas Munro wrote: Hmm. Yeah, I see the notational problem. It's hard to come up with a new syntax that has SQL nature. What if... we didn't use a new syntax at all, but recognised existing queries that are executable with this strategy? Queries like this: WITH

Re: [HACKERS] ASOF join

2017-06-21 Thread Thomas Munro
On Mon, Jun 19, 2017 at 11:57 PM, Konstantin Knizhnik wrote: > I attached simple patch adding ASOF join to Postgres. Right now it support > only outer join and requires USING clause (consequently it is not possible > to join two tables which joi keys has different

Re: [HACKERS] ASOF join

2017-06-19 Thread Konstantin Knizhnik
On 16.06.2017 19:07, David Fetter wrote: On Fri, Jun 16, 2017 at 11:51:34AM +1200, Thomas Munro wrote: On Fri, Jun 16, 2017 at 4:20 AM, Konstantin Knizhnik wrote: I wonder if there were some discussion/attempts to add ASOF join to Postgres (sorry, may be there is

Re: [HACKERS] ASOF join

2017-06-16 Thread David Fetter
On Fri, Jun 16, 2017 at 11:51:34AM +1200, Thomas Munro wrote: > On Fri, Jun 16, 2017 at 4:20 AM, Konstantin Knizhnik > wrote: > > I wonder if there were some discussion/attempts to add ASOF join to Postgres > > (sorry, may be there is better term for it, I am refereeing

Re: [HACKERS] ASOF join

2017-06-15 Thread Thomas Munro
On Fri, Jun 16, 2017 at 4:20 AM, Konstantin Knizhnik wrote: > I wonder if there were some discussion/attempts to add ASOF join to Postgres > (sorry, may be there is better term for it, I am refereeing KDB definition: > http://code.kx.com/wiki/Reference/aj ).

[HACKERS] ASOF join

2017-06-15 Thread Konstantin Knizhnik
I wonder if there were some discussion/attempts to add ASOF join to Postgres (sorry, may be there is better term for it, I am refereeing KDB definition: http://code.kx.com/wiki/Reference/aj ). Such kind of join can be useful when we need to associate two timeseries. It is quite popular in