Re: Postgres 13 signal 11: Segmentation fault tested on 2 independent machines

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: pinker <pinker@onet.eu>
Cc: pgsql-bugs@postgresql.org
Date: 2020-10-19T00:18:56Z
Lists: pgsql-bugs
Oh, here's a simpler reproducer:

create or replace function foo (out schemaname text, out relname text)
returns setof record language sql
as $$
  select nspname, relname from pg_class c join pg_namespace n
  on (n.oid = relnamespace)
  order by 1
$$;

select * from foo();

It doesn't fail without the ORDER BY, suggesting that the problem
is localized in failing to handle the case where a sort key
column needs to be coerced.

			regards, tom lane



Commits

  1. Fix list-munging bug that broke SQL function result coercions.