]> granicus.if.org Git - postgresql/commitdiff
Revert patch adding support for logging the current role.
authorRobert Haas <rhaas@postgresql.org>
Wed, 12 Jan 2011 16:59:21 +0000 (11:59 -0500)
committerRobert Haas <rhaas@postgresql.org>
Wed, 12 Jan 2011 16:59:21 +0000 (11:59 -0500)
This reverts commit a8a8867912c46a68c9ac14903b3dba2fab8f7097, committed
by me earlier today (2011-01-12).  This isn't safe inside an aborted
transaction.

Noted by Tom Lane.

doc/src/sgml/config.sgml
src/backend/utils/error/elog.c

index d014bb5738049a415914c457cb68f641d2bd480b..8e2a2c5d73685aa4b6bd61d2fe88232008601804 100644 (file)
@@ -3504,12 +3504,7 @@ local0.*    /var/log/postgresql
             </row>
             <row>
              <entry><literal>%u</literal></entry>
-             <entry>Login user name</entry>
-             <entry>yes</entry>
-            </row>
-            <row>
-             <entry><literal>%U</literal></entry>
-             <entry>Current user name</entry>
+             <entry>User name</entry>
              <entry>yes</entry>
             </row>
             <row>
index 49d9236767d573745b6d0a523050ce46e10ccc4f..a1a449f2ddcfa710702dce767ea0ca515c5d6645 100644 (file)
@@ -1826,16 +1826,6 @@ log_line_prefix(StringInfo buf, ErrorData *edata)
                                        appendStringInfoString(buf, username);
                                }
                                break;
-                       case 'U':
-                               if (MyProcPort)
-                               {
-                                       const char *username = GetUserNameFromId(GetUserId());
-
-                                       if (username == NULL || *username == '\0')
-                                               username = _("[unknown]");
-                                       appendStringInfoString(buf, username);
-                               }
-                               break;
                        case 'd':
                                if (MyProcPort)
                                {