| From: | jian he <jian(dot)universality(at)gmail(dot)com> |
|---|---|
| To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Error position support for ComputeIndexAttrs |
| Date: | 2025-12-16 07:21:04 |
| Message-ID: | CACJufxH3OgXF1hrzGAaWyNtye2jHEmk9JbtrtGv-KJK6tsGo5w@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
hi.
Following the addition of error position support to ComputePartitionAttrs in
[0], we can extend this feature to ComputeIndexAttrs.
Both partition keys and indexes support expressions and share a 32-column
limit, CREATE INDEX can be as complicated as PARTITION BY expression, and given
that ComputeIndexAttrs already contains 14 calls to ereport(ERROR, ...).
Adding error position support for ComputeIndexAttrs seems to make sense.
To achieve this, ComputeIndexAttrs must receive a ParseState. Since
ComputeIndexAttrs is nested under DefineIndex , DefineIndex must also have a
ParseState.
v1-0001: almost the same as [1], the only difference is after
makeNode(IndexElem),
we should set the location to -1.
v1-0002: Error position support for ComputeIndexAttrs
[0]: https://git.postgresql.org/cgit/postgresql.git/commit/?id=1e5e4efd02b614908cae62d9452528462d307224
[1]: https://postgr.es/m/202512121327.f2zimsr6guso@alvherre.pgsql
| Attachment | Content-Type | Size |
|---|---|---|
| v1-0001-add-Location-to-IndexElem.patch | text/x-patch | 5.9 KB |
| v1-0002-Error-position-support-for-index-specifications.patch | text/x-patch | 25.8 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2025-12-16 07:33:17 | Re: relfilenode statistics |
| Previous Message | Amit Kapila | 2025-12-16 07:17:52 | Re: Proposal: Conflict log history table for Logical Replication |