postgresql/src/backend
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
..
access Move WAL-related definitions from dbcommands.h to separate header file. 2015-03-09 15:50:49 +02:00
bootstrap Change many routines to return ObjectAddress rather than OID 2015-03-03 14:10:50 -03:00
catalog Allow CURRENT/SESSION_USER to be used in certain commands 2015-03-09 15:41:54 -03:00
commands Allow CURRENT/SESSION_USER to be used in certain commands 2015-03-09 15:41:54 -03:00
executor Use the typcache to cache constraints for domain types. 2015-03-01 14:06:55 -05:00
foreign Update copyright for 2015 2015-01-06 11:43:47 -05:00
lib Fix a bug in pairing heap removal code. 2015-02-17 22:55:53 +02:00
libpq Use FLEXIBLE_ARRAY_MEMBER in a number of other places. 2015-02-21 16:12:14 -05:00
main Don't require users of src/port/gettimeofday.c to initialize it. 2015-02-21 12:17:04 -05:00
nodes Allow CURRENT/SESSION_USER to be used in certain commands 2015-03-09 15:41:54 -03:00
optimizer Fix long-obsolete code for separating filter conditions in cost_index(). 2015-03-03 21:19:42 -05:00
parser Allow CURRENT/SESSION_USER to be used in certain commands 2015-03-09 15:41:54 -03:00
po Translation updates 2015-02-01 23:23:40 -05:00
port Remove the option to service interrupts during PGSemaphoreLock(). 2015-02-03 23:25:00 +01:00
postmaster Replace checkpoint_segments with min_wal_size and max_wal_size. 2015-02-23 18:53:02 +02:00
regex Replace a bunch more uses of strncpy() with safer coding. 2015-01-24 13:05:42 -05:00
replication Fix an obsolete reference to SnapshotNow in comment. 2015-03-04 12:25:48 +09:00
rewrite Change many routines to return ObjectAddress rather than OID 2015-03-03 14:10:50 -03:00
snowball Update copyright for 2015 2015-01-06 11:43:47 -05:00
storage Guard against spurious signals in LockBufferForCleanup. 2015-02-23 16:14:14 +01:00
tcop Code cleanup for REINDEX DATABASE/SCHEMA/SYSTEM. 2015-03-08 12:18:43 -04:00
tsearch Update copyright for 2015 2015-01-06 11:43:47 -05:00
utils Allow CURRENT/SESSION_USER to be used in certain commands 2015-03-09 15:41:54 -03:00
.gitignore Add gitignore for mingw/cygwin build outputs 2011-06-09 18:11:47 +02:00
Makefile Update copyright for 2015 2015-01-06 11:43:47 -05:00
common.mk Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
nls.mk Translation updates 2015-02-01 23:23:40 -05:00