Weeknotes Web Development March 7, 2021

Learning about Python in PostgreSQL

I always knew there were embedded programming languages in PostgreSQL, but I never thought about why they might be interesting or more useful than plpgsql.

I am still learning about pl/Python and what I might want to do with it. It seems that if you have a large query and need to process the results and possibly update a bunch of rows, it’s more efficient to do that in database than to pull everything out and put it back in from an external Python interpreter.

I also found https://github.com/vatsan/pandas_via_psql which is a comand line tool to create visualizations (graphs) from a SQL query.

I read a Twitter thread backwards, it all started with this https://info.crunchydata.com/blog/recommendation_engine_in_postgres_with_pandas_and_python

Testing Django Admin with pytest https://til.simonwillison.net/django/testing-django-admin-with-pytest