Noticed when upgraded to 8.11.3 that the parsing of duplicated column names has changed, and broke some of our queries.
I made a minimal example of situation:
const res1 = await client.query('SELECT NULL AS test, 10 AS test, NULL AS test')
const res2 = await client.query('SELECT NULL AS test, 10 AS test, 12 AS test')
console.log(res1.rows[0].test)
console.log(res2.rows[0].test)
With 8.11.3, code above prints
And with 8.11.2, it prints
For me, it should be consistent, either leftmost or rightmost column, but never some kind of "last non-null"
I also checked code, and this is caused by #3043 dropping else-branch https://github.com/brianc/node-postgres/pull/3043/files#diff-e7208163de109ecdddff33a5473cb7c255bd7693a1ec06da8300fe88cabf7a4fL70 here