RUN apk add --no-cache --virtual .build-deps build-base postgresql-dev clang15 llvm15 ; \ wget -qO- https://github.com/iCyberon/pg_hashids/archive/refs/tags/v1.2.1.tar.gz | tar xzf - -C /tmp && \ make -C /tmp/pg_hashids-1.2.1 && \ make -C /tmp/pg_hashids-1.2.1 install && \ rm -rf /tmp/pg_hashids-1.2.1 && \ apk del .build-deps
So you aren’t even using version 3 of that library and it’s read me doesn’t mention testing on anything earlier that 9.6.x. You are asking for help in the wrong place unless you can somehow demonstrate a problem that doesn’t depend on the output of this third-party library function.
I’d at least see whether the most recent release of that library has the same problem.
I see you did open an issue with them…I do get that the difference in behavior emanating from how the update is written is quite odd and seemingly not plausibly the fault of an extension. I assume the trigger is required to produce the error (if not, an example without it is much better). Or one with the trigger but a core function instead.