Support `excluded` table alias in `INSERT ... ON CONFLICT`
Open
data import
enhancement
- Dominant language
- Go
- Stars
- 2.1k
- Forks
- 73
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 152
Description
The `ON CONFLICT` clause of the `INSERT` statement implicitly provides a table alias named `excluded` that represents the row proposed for insertion.
Example:
```sql
INSERT INTO distributors (did, dname)
VALUES (5, 'Gizmo Transglobal'), (6, 'Associated Computing, Inc')
ON CONFLICT (did) DO UPDATE SET dname = EXCLUDED.dname;
```
[PostgreSQL Docs](https://www.postgresql.org/docs/current/sql-insert.html)
Found while testing DoltHub postgres schema.
Contributor guide
Assessment
This issue has not been assessed yet.