BUG #8393: "ERROR: failed to locate grouping columns" on grouping by varchar returned from function

Поиск
Список
Период
Сортировка
От postgresql@realityexists.net
Тема BUG #8393: "ERROR: failed to locate grouping columns" on grouping by varchar returned from function
Дата
Msg-id E1VCmgF-0001uF-9I@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #8393: "ERROR: failed to locate grouping columns" on grouping by varchar returned from function  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      8393
Logged by:          Evan Martin
Email address:      postgresql@realityexists.net
PostgreSQL version: 9.2.4
Operating system:   Windows 7 x64 SP1
Description:

version(): PostgreSQL 9.2.4, compiled by Visual C++ build 1600, 64-bit


Run the following:


CREATE OR REPLACE FUNCTION test_group_by()
RETURNS TABLE (my_col varchar(5))
AS $BODY$
    SELECT 'hello'::varchar(5);
$BODY$ LANGUAGE sql STABLE;


SELECT my_col
FROM test_group_by()
GROUP BY 1;




Expected result:


'hello'


Actual result:


ERROR:  failed to locate grouping columns


Interestingly, if the function is marked "VOLATILE" it works. Casting the
result to "text" also makes it work.

В списке pgsql-bugs по дате отправления:

Предыдущее
От: ダンミンフーン
Дата:
Сообщение: Re: After promote, DB can not UPDATE with SAVEPOINT (could not access status of transaction 1409172)
Следующее
От: Valdas Dienas
Дата:
Сообщение: PG_restore