BUG #16121: 12 regression: Volatile function in target list subquery behave as stable
| От | PG Bug reporting form |
|---|---|
| Тема | BUG #16121: 12 regression: Volatile function in target list subquery behave as stable |
| Дата | |
| Msg-id | 16121-b8e8dc82e608b89d@postgresql.org обсуждение исходный текст |
| Ответы |
Re: BUG #16121: 12 regression: Volatile function in target list subquery behave as stable
|
| Список | pgsql-bugs |
The following bug has been logged on the website: Bug reference: 16121 Logged by: Elvis Pranskevichus Email address: elprans@gmail.com PostgreSQL version: 12.1 Operating system: Gentoo Linux Description: There seems to be a regression in Postgres 12 related to how volatile functions are handled. If put inside a subquery in the target list, the volatile function seems to behave like a stable one: volatility=# SELECT v.i, (SELECT random() from (values (v.i)) as q) AS v1 FROM generate_series(1, 2) as v(i); i │ v1 ───┼──────────────────── 1 │ 0.8303615124282295 2 │ 0.8303615124282295 (2 rows) Postgres 11 and earlier worked correctly: volatility=# SELECT v.i, (SELECT random() from (values (v.i)) as q) AS v1 FROM generate_series(1, 2) as v(i); i │ v1 ───┼─────────────────── 1 │ 0.137472071684897 2 │ 0.288798084016889 (2 rows)
В списке pgsql-bugs по дате отправления: