Tatsuo Ishii <t-ishii@sra.co.jp> writes:
>>> test=# select count(a.*) from pg_indexes a limit 10;
>>> server closed the connection unexpectedly
>>
>> Hmmm ... the crash is certainly UnGood, but is there any reason we
>> should accept this query rather than generating an error?
> If the SQL is not legal, generating an error is enough, I think.
The actual bug turns out to affect any use of a whole-row reference to
a subquery, so it has to be fixed whether you think the above is
particularly meaningful or not --- for example, if foo() is defined to
accept a parameter that is the rowtype of pg_indexes, it surely should
work to sayselect foo(a.*) from pg_indexes a;
In light of that, I just fixed the bug and did not do anything about
prohibiting passing rowtype values to count(). We have historically
allowed that, and I haven't got a good argument for removing it.
regards, tom lane