insert_username
functions for tracking who changed a table
insert_username : functions for tracking who changed a table
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 4882 | insert_username | insert_username | 1.0 |
FUNC | PostgreSQL | C |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --s-d-- | No | Yes | No | Yes | no | no |
| Relationships | |
|---|---|
| See Also | tcn refint autoinc moddatetime table_log |
Packages
| PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|
| 1.0 | 1.0 | 1.0 | 1.0 | 1.0 |
This is a built-in contrib extension ship with the PostgreSQL kernel
Install
Create this extension with:
Usage
Provides a trigger function that stores the current user’s name into a specified text column.
Trigger Function
| Function | Description |
|---|---|
insert_username() |
Store current username in the specified column |
Parameter: name of the text column to store the username.