Add a function to get the authenticated user ID.

Robert Haas <rhaas@postgresql.org>

Commit: 5ac372fc1a7cc673cc7d4cf26ba651d52495b27a
Author: Robert Haas <rhaas@postgresql.org>
Date: 2014-10-23T12:18:45Z
Releases: 9.5.0
Add a function to get the authenticated user ID.

Previously, this was not exposed outside of miscinit.c.  It is needed
for the pending pg_background patch, and will also be needed for
parallelism.  Without it, there's no way for a background worker to
re-create the exact authentication environment that was present in the
process that started it, which could lead to security exposures.

Files

PathChange+/−
src/backend/utils/init/miscinit.c modified +10 −0
src/include/miscadmin.h modified +1 −0