autoinc
functions for autoincrementing fields
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
autoinc | 1.0 | FUNC | PostgreSQL | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 4881 | autoinc | No | Yes | No | Yes | No | No | - |
| Related | tcn refint insert_username moddatetime table_log |
|---|
Version
| PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|
| 1.0 | 1.0 | 1.0 | 1.0 | 1.0 |
Install
Note: This is a built-in contrib extension of PostgreSQL
Usage
Provides a trigger function that auto-increments specified columns using sequences.
Trigger Function
| Function | Description |
|---|---|
autoinc() | Auto-increment columns from sequences on insert (and optionally update) |
Parameters are pairs of (column name, sequence name). The value is replaced only if initially zero or NULL.
Examples
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)