filter with json_agg(DISTINCT table.*) behaves differently

Started by PG Bug reporting formabout 6 years ago1 messagesdocs
Jump to latest
#1PG Bug reporting form
noreply@postgresql.org

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/10/release-10-7.html
Description:

Following is our finding:

Postgres query behaves differently in 2 version

Specifically

(json_agg(DISTINCT table_name.*) filter(where table_name is not null)) as
table,
.
.
.

gives null record in 10.7 where it gives proper data in 10.6

Following is the version difference of postgres

WORKING - PostgreSQL 10.6 on x86_64-pc-linux-gnu, compiled by gcc (GCC)
4.8.3 20140911 (Red Hat 4.8.3-9), 64-bit

NOT WORKING - PostgreSQL 10.7 on x86_64-pc-linux-gnu, compiled by gcc (GCC)
4.9.3, 64-bit