mirror of
https://github.com/postgres/postgres.git
synced 2026-07-11 10:35:32 -04:00
Assert index_attnos[0] == 1 in ri_FastPathFlushArray()
ri_FastPathFlushArray() handles single-column FKs only, so
index_attnos[0] is always 1. Add an Assert to make this invariant
explicit, as a followup to 980c1a85d8.
Suggested-by: Junwang Zhao <zhjwpku@gmail.com> (offlist)
Discussion: https://www.postgresql.org/message-id/CADfhSr-pCkbDxmiOVYSAGE5QGjsQ48KKH_W424SPk%2BpwzKZFaQ%40mail.gmail.com
This commit is contained in:
parent
980c1a85d8
commit
155c03ee9d
1 changed files with 2 additions and 2 deletions
|
|
@ -3097,10 +3097,10 @@ ri_FastPathFlushArray(RI_FastPathEntry *fpentry, TupleTableSlot *fk_slot,
|
|||
*
|
||||
* PK indexes are always btree, which supports SK_SEARCHARRAY.
|
||||
*
|
||||
* Reference index_attnos[0] for attribute number and collation since this
|
||||
* is a single-column fast path.
|
||||
* This path handles single-column FKs only, so index_attnos[0] == 1.
|
||||
*/
|
||||
Assert(idx_rel->rd_indam->amsearcharray);
|
||||
Assert(fpmeta->index_attnos[0] == 1);
|
||||
ScanKeyEntryInitialize(&skey[0],
|
||||
SK_SEARCHARRAY,
|
||||
fpmeta->index_attnos[0],
|
||||
|
|
|
|||
Loading…
Reference in a new issue