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 Revert haphazard pgxs makefile changes 2014-12-04 08:07:59 -05:00
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 Remove duplicate specification of -Ae for HP-UX C compiler. 2015-01-13 22:52:11 -05:00
test Allow CURRENT/SESSION_USER to be used in certain commands 2015-03-09 15:41:54 -03:00
timezone Update time zone data files to tzdata release 2015a. 2015-01-30 22:45:44 -05:00
tools pgbench: Add a real expression syntax to \set 2015-03-02 14:21:41 -05:00
tutorial Update copyright for 2015 2015-01-06 11:43:47 -05:00
.gitignore
DEVELOPERS
Makefile Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
Makefile.global.in Fix installcheck case for tap tests 2014-12-24 10:31:36 -05:00
Makefile.shlib Unlink static libraries before rebuilding them. 2015-03-01 13:05:23 -05:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
nls-global.mk Setup error context callback for transaction lock waits 2014-03-19 15:10:36 -03:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00