On 12/13/22 13:20, Shaozhong SHI wrote:
What is brilliant about plpython? Any brilliant examples to look at?
1) It is actually plython(3)u where the u means untrusted. This means you can reach outside the database and do things. That can seen as brilliant or dangerous.
2) You have no end of Python libraries you can work with. Again combined with 1) up you whether that is brilliant or dangerous.
3) Python is more dynamic then plpgsql so you can get more adventurous with doing dynamic SQL.
Downside is that plpython(3)u is not tied as closely to SQL as plpgsql so it very often takes you many more lines of code to get something done.
-- Adrian Klaver adrian.klaver@xxxxxxxxxxx