Revert "make the SQL getter functions "STABLE" instead of "IMMUTABLE""

This reverts commit 822ee1edb5b6101ef38e7c5bd7f0621303223dcd.