Re: aggregate + view + alias crash on 7.4 stable - Mailing list pgsql-hackers

From Tom Lane
Subject Re: aggregate + view + alias crash on 7.4 stable
Date
Msg-id 21861.1070908389@sss.pgh.pa.us
Whole thread Raw
In response to Re: aggregate + view + alias crash on 7.4 stable  (Tatsuo Ishii <t-ishii@sra.co.jp>)
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: CVS HEAD compile failure
Next
From: Andrew Dunstan
Date:
Subject: Re: CVS HEAD compile failure