Hi,

>> So, my question is: Is there a recognised technique (using SQL only,
>> not PL/pgSQL - soutions based on the latter are easy to find) whereby
>> I can do a basic Linear Interpolation?

> I don't have a recognized technique, nor care to ponder one right now, but 
> what you've described would best be done in pure SQL using WITH RECURSIVE, 
> which provides an iterative approach to SQL result building.  Which is more 
> commonly done in a procedural language.  The algorithm you describe is an 
> iterative algorithm and so I'm wondering why place the arbitrary restriction 
> on using pure SQL when it likely wouldn't provide a very readable nor 
> performant solution relative to a procedural (pl/pgsql or otherwise) one?

Well, it would be trivial to do something with PL/pgSQL (just Google
and download the code - there are a few examples around).

I''m a big fan of this site https://explainextended.com/ - this guy
can do anything with SQL - I'd like to try and learn how to do the
same.

You're idea of RECURSIVE is exactly along the lines I was thinking of
- I'll persevere and see what I can come up with using WITH RECURSIVE
- I've use it before.

Thanks for your input and rgs,


Pól...


> David J.


Reply via email to