Unexpected behaviour using table functions over multivalued columns with same length

debbug 注册会员
2023-01-25 02:55

You are using table functions in the SELECT list, which is supported, but strange. You should use them in the FROM clause of your query instead.

Besides, the behavior of your query changed in PostgreSQL version 10 (and you must be using an older version). The release notes from v10 describe that:

Your query exhibits the old "cycling" behavior: if both functions return a table of two rows, you will get two result rows. If one returns m rows and the other n, the number of result rows will be the least common multiple of m and n.

You should upgrade to a supported version of PostgreSQL.