pavel.stehule@xxxxxxxxx wrote:
bryn@xxxxxxxxxxxx wrote:
I’m still hoping that I might get some pointers to whitepapers or blog posts that expand on those bullets that I quoted from the PG doc: «Instead of packages, use schemas to organize your functions into groups.» and «Since there are no packages, there are no package-level variables either. This is somewhat annoying. You can keep per-session state in temporary tables instead.»
I fixed a patch https://commitfest.postgresql.org/36/1608/ so you can check it.
Using temporary tables instead of session variables is not too practical. There are more alternative ways - a) one extension, b) using global variables from Perl, c) using global configuration variables. The @c is most common today
http://okbob.blogspot.com/2021/06/current_setting
Do you have a plain English account of what your patch will bring for the application programmer?
Your current_setting blog post shows me that you use this:
pts := current_setting('tps.ts', true)::timestamp with time zone;
Is that your point? I so, then thanks. Yes, I’ve used this technique myself. |