The following bug has been logged on the website:
Bug reference: 18764
Logged by: Jason Smith
Email address: dqetool(at)126(dot)com
PostgreSQL version: 17.2
Operating system: Linux
Description:
Run the following statements and an error is returned.
CREATE TABLE t0 (c1 INT, c2 DECIMAL);
INSERT INTO t0 VALUES (0, NULL);
INSERT INTO t0 VALUES (8, NULL);
SELECT c2 AS ca2, c2 AS ca3 FROM t0 UNION SELECT DISTINCT ca8 AS ca5, ca7 AS
ca6 FROM (SELECT c1 AS ca7, c2 AS ca8 FROM t0) AS ta1 JOIN (SELECT c1 AS
ca10, c1 AS ca11 FROM t0) AS ta2 ON TRUE; -- server closed the connection
unexpectedly