On Friday, November 3, 2023, Mark Hills <m...@xwax.org> wrote: > > pg_restore: error: could not execute query: ERROR: type "hash" does not > exist > LINE 7: )::hash; > [...] > CONTEXT: SQL function "gen_hash" during inlining > > -- > -- Relevant SQL declarations > -- >
Those were not all of the relevant SQL declarations. In particular you haven’t shown where in your schema the gen_hash gets called. Odds are you’ve violated a “cannot execute queries in …” rule in something like a generated column or a check expression. That it didn’t fail before now is just a fluke. I seem to recall another recent report of this for v16 that goes into more detail. David J.