postgresql/src
Alvaro Herrera 31eae6028e Allow CURRENT/SESSION_USER to be used in certain commands
Commands such as ALTER USER, ALTER GROUP, ALTER ROLE, GRANT, and the
various ALTER OBJECT / OWNER TO, as well as ad-hoc clauses related to
roles such as the AUTHORIZATION clause of CREATE SCHEMA, the FOR clause
of CREATE USER MAPPING, and the FOR ROLE clause of ALTER DEFAULT
PRIVILEGES can now take the keywords CURRENT_USER and SESSION_USER as
user specifiers in place of an explicit user name.

This commit also fixes some quite ugly handling of special standards-
mandated syntax in CREATE USER MAPPING, which in particular would fail
to work in presence of a role named "current_user".

The special role specifiers PUBLIC and NONE also have more consistent
handling now.

Also take the opportunity to add location tracking to user specifiers.

Authors: Kyotaro Horiguchi.  Heavily reworked by Álvaro Herrera.
Reviewed by: Rushabh Lathia, Adam Brightwell, Marti Raudsepp.
2015-03-09 15:41:54 -03:00
..
backend Allow CURRENT/SESSION_USER to be used in certain commands 2015-03-09 15:41:54 -03:00
bin Sort SUBDIRS variable in src/bin/Makefile 2015-03-08 14:09:34 -04:00
common Unlink static libraries before rebuilding them. 2015-03-01 13:05:23 -05:00
include Allow CURRENT/SESSION_USER to be used in certain commands 2015-03-09 15:41:54 -03:00
interfaces Revert "Ignore object files generated by ecpg test suite on Windows" 2015-03-09 18:48:13 +01:00
makefiles
pl Change plpgsql's cast cache to consider source typmod as significant. 2015-03-04 20:23:13 -05:00
port Build fls.o only when AC_REPLACE_FUNCS so dictates via $(LIBOBJS). 2015-03-07 00:48:04 -05:00
template
test Allow CURRENT/SESSION_USER to be used in certain commands 2015-03-09 15:41:54 -03:00
timezone
tools pgbench: Add a real expression syntax to \set 2015-03-02 14:21:41 -05:00
tutorial
.gitignore
bcc32.mak
DEVELOPERS
Makefile
Makefile.global.in
Makefile.shlib Unlink static libraries before rebuilding them. 2015-03-01 13:05:23 -05:00
nls-global.mk
win32.mak