Commit 305d4f2
fix(postgresql): parsing bug with expression based unique indexes on postgres (prisma#5726)
Fixes a bug where the unique key violation parsing incorrectly returns
extra "comma" characters for expression based unique indexes such as:
```
CREATE UNIQUE INDEX "unique_idx" ON "table_name"(
"column_1",
(column_2->>'field'),
);
```
In which case the columns affected would previously be returned as
`["column_1,"]` instead of `["column_1"]`
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: jacek-prisma <malec@prisma.io>1 parent 4186f91 commit 305d4f2
2 files changed
Lines changed: 34 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
115 | 148 | | |
116 | 149 | | |
117 | 150 | | |
| |||
0 commit comments