Re: Server goes to Recovery Mode when run a SQL
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: PegoraroF10 <marcos@f10.com.br>
Cc: pgsql-general@postgresql.org
Date: 2020-08-14T20:40:19Z
Lists: pgsql-general
PegoraroF10 <marcos@f10.com.br> writes: > CREATE FUNCTION public.fntextonumero(finteger public.i32, ftext text) > RETURNS boolean > LANGUAGE sql STABLE > AS $$ > SELECT ftext = finteger::text; > $$; Huh. The crash goes away if you change that to SELECT finteger::text = ftext; It looks like ExecInitSubPlan is just assuming that the outer side of the hashable comparison condition is on the left, and this function is confusing it by swapping that around to the right. Kinda surprising that we never identified that problem before --- this code's been like this for years. regards, tom lane
Commits
-
Be more careful about the shape of hashable subplan clauses.
- dea07098af20 10.15 landed
- b538e83f17e3 13.0 landed
- 9d472b51e987 11.10 landed
- 912fb290c5dd 12.5 landed
- 7241edc4fa8c 9.6.20 landed
- 5190707d7436 9.5.24 landed
- 1e7629d2c95f 14.0 landed