Re: Proposing WITH ITERATIVE - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: Proposing WITH ITERATIVE
Date
Msg-id 2d6ac118a6d602a2a0b6cbe4f75bd54154cab26e.camel@j-davis.com
Whole thread Raw
In response to Re: Proposing WITH ITERATIVE  ("Jonah H. Harris" <jonah.harris@gmail.com>)
List pgsql-hackers
On Tue, 2020-04-28 at 11:57 -0400, Jonah H. Harris wrote:
> Yeah, in that specific case, one of the other implementations seems
> to carry the counters along in the executor itself. But, as not all
> uses of this functionality are iteration-count-based, I think that's
> a little limiting. Using a terminator expression (of some kind) seems
> most adaptable, I think. I'll give some examples of both types of
> cases.

In my experience, graph algorithms or other queries doing more
specialized analysis tend to get pretty complex with lots of special
cases. Users may want to express these algorithms in a more familiar
language (R, Python, etc.), and to version the code (probably in an
extension).

Have you considered taking this to the extreme and implementing
something like User-Defined Table Operators[1]? Or is there a
motivation for writing such algorithms inline in SQL?

Regards,
    Jeff Davis

[1] http://www.vldb.org/conf/1999/P47.pdf





pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Why are wait events not reported even though it reads/writes atimeline history file?
Next
From: Fujii Masao
Date:
Subject: Re: SLRU statistics