I l @ ve RuBoard |
User FunctionsSeveral of the included functions in PostgreSQL deal with user and session issues. The following sections discuss user- related functions. CURRENT_USERDescriptionThe CURRENT_USER function returns the user ID being used for permission checking. InputsNone. ExampleSELECT CURRENT_USER; -------------- webuser NotesCurrently, CURRENT_USER and SESSION_USER are the same, but in the future, there might be a distinction as needed for programs running in a setuid mode. Notice that the preceding function is not called with the trailing parentheses "()". This is to maintain SQL compatibility. SESSION_USERDescriptionThe SESSION_USER function returns the user ID that is currently logged into PostgreSQL. InputsNone. ExampleSELECT SESSION_USER; -------------- webuser NotesCurrently, CURRENT_USER and SESSION_USER are the same, but in the future, there might be a distinction as needed for programs running in a setuid mode. Notice that the preceding function is not called with the trailing parenthesis "()". This is to maintain SQL compatibility. USERNotesSee CURRENT_USER. |
I l @ ve RuBoard |