9.7. CURRENT_USER

Available in

DSQL, PSQL

Syntax

  1. CURRENT_USER

Type

VARCHAR(31)

Description

CURRENT_USER is a context variable containing the name of the currently connected user. It is fully equivalent to USER.

Example

  1. create trigger bi_customers for customers before insert as
  2. begin
  3. New.added_by = CURRENT_USER;
  4. New.purchases = 0;
  5. end