Re: default sorting behavior for index

2022-09-20 Thread Tom Lane
Zhihong Yu writes: > I was looking at this check in src/backend/parser/parse_utilcmd.c w.r.t. > constraint: > ... > If the index has DESC sorting order, why it cannot be used to back a > constraint ? > Some concrete sample would help me understand this. Please read the nearby comments, particular

default sorting behavior for index

2022-09-20 Thread Zhihong Yu
Hi, I was looking at this check in src/backend/parser/parse_utilcmd.c w.r.t. constraint: if (indclass->values[i] != defopclass || attform->attcollation != index_rel->rd_indcollation[i] || attoptions != (Datum) 0 || index_r