readysettech / readyset

Readyset is a MySQL and Postgres wire-compatible caching layer that sits in front of existing databases to speed up queries and horizontally scale read throughput. Under the hood, ReadySet caches the results of cached select statements and incrementally updates these results over time as the underlying data changes.
https://readyset.io
Other
4.54k stars 125 forks source link

Are Postgres UDFs with PL/pgSQL supported? #1398

Open aleclarson opened 2 weeks ago

aleclarson commented 2 weeks ago

I asked this over in the Slack, but I figured it would be better to have it answered/tracked here.

All of my queries are pre-defined with CREATE FUNCTION and LANGUAGE plpgsql.

So I'm basically doing SELECT my_func($1, $2) over and over with varying function names and parameter counts.

My guess is the main blocker here is PL/pgSQL, but it's also possible that Readyset doesn't try to “look inside” UDFs at all.

Note: I haven't tried it myself yet.