postgresql/src
Tom Lane d3d53f955c Add a way to get the current function's OID in pl/pgsql.
Invent "GET DIAGNOSTICS oid_variable = PG_ROUTINE_OID".
This is useful for avoiding the maintenance nuisances that come
with embedding a function's name in its body, as one might do
for logging purposes for example.  Typically users would cast the
result to regproc or regprocedure to get something human-readable,
but we won't pre-judge whether that's appropriate.

Pavel Stehule, reviewed by Kirk Wolak and myself

Discussion: https://postgr.es/m/CAFj8pRA4zMd5pY-B89Gm64bDLRt-L+akOd34aD1j4PEstHHSVQ@mail.gmail.com
2023-04-04 13:33:18 -04:00
..
backend Add a run_as_owner option to subscriptions. 2023-04-04 12:03:03 -04:00
bin Add a run_as_owner option to subscriptions. 2023-04-04 12:03:03 -04:00
common Make SCRAM iteration count configurable 2023-03-27 09:46:29 +02:00
fe_utils Revert refactoring of restore command code to shell_restore.c 2023-02-06 08:28:42 +09:00
include Add a run_as_owner option to subscriptions. 2023-04-04 12:03:03 -04:00
interfaces Code review for recent SQL/JSON commits 2023-04-04 14:04:30 +02:00
makefiles meson: Make auto the default of the ssl option 2023-03-13 07:04:11 +01:00
pl Add a way to get the current function's OID in pl/pgsql. 2023-04-04 13:33:18 -04:00
port Use nanosleep() to implement pg_usleep(). 2023-03-15 17:57:12 +13:00
template Use unnamed POSIX semaphores on Cygwin. 2023-01-06 10:33:28 +13:00
test Add a way to get the current function's OID in pl/pgsql. 2023-04-04 13:33:18 -04:00
timezone Fix outdated references to guc.c 2023-03-02 13:49:39 +01:00
tools Revert 11470f544e 2023-04-03 16:54:31 +03:00
tutorial Remove useless casts to (void *) in arguments of some system functions 2023-02-07 06:57:59 +01:00
.gitignore
DEVELOPERS
Makefile Integrate pg_bsd_indent into our build/test infrastructure. 2023-02-12 12:22:21 -05:00
Makefile.global.in pg_regress: Emit TAP compliant output 2023-03-31 13:00:02 +02:00
Makefile.shlib autoconf: Rely on ar supporting index creation 2022-10-07 11:53:39 -07:00
meson.build Integrate pg_bsd_indent into our build/test infrastructure. 2023-02-12 12:22:21 -05:00
nls-global.mk Fix for make unportability 2022-07-13 09:15:01 +02:00