While trying to upgrade to NAV 5.16.1, navsyncdb throws this error:
sql/changes/sc.05.16.0001.sql: operator is not unique: unknown || integer LINE 1: new_token_str := 'token #' || token_rec.id || ' (' || trunca... ^ HINT: Could not choose a best candidate operator. You might need to add explicit type casts. QUERY: new_token_str := 'token #' || token_rec.id || ' (' || truncated_comment || ')' CONTEXT: PL/pgSQL function inline_code_block line 22 at assignment
PostgreSQL version 14.21 (both client and server) on FreeBSD
The solution is to explicitly cast the two places where it is missing:
28c28 < new_token_str := 'token #' || token_rec.id || ' (' || truncated_comment || ')'; ---
new_token_str := 'token #' || token_rec.id::TEXT || ' (' || truncated_comment || ')';
30c30 < new_token_str := 'token #' || token_rec.id; ---
new_token_str := 'token #' || token_rec.id::TEXT;
--Ingeborg