Re: [HACKERS] Aggregates and row types

2017-03-21 Thread Tom Lane
Thomas Munro writes: > Is is expected that the first query below can be analysed and planned, > but the second can't? > explain select x from (select row(42)) s(x); > explain select count(x) from (select row(42)) s(x); > ERROR: record type has not been registered Well, ideally that wouldn't ha

[HACKERS] Aggregates and row types

2017-03-21 Thread Thomas Munro
Hi, Is is expected that the first query below can be analysed and planned, but the second can't? explain select x from (select row(42)) s(x); explain select count(x) from (select row(42)) s(x); ERROR: record type has not been registered That may be a strange thing to want to do, but it's somet