I’ve used Prest (the Go reimplementation of PostgREST) because I could more easily customize or bring it in as a library in a larger application.
And, interesting to note that using triggers within pocketbase isn't well supported because they do a dry run insert to check against constraints and then delete it if the constraint fails.
https://github.com/pocketbase/pocketbase/discussions/650#dis...
I mention this because the OP inquired about stored procedures, somewhat related.
Still, pocketbase is so amazing.
And from there you can execute your own command and add handlers or other things as you wish.