From: | Jarosław Stokłosa <jarek(dot)stoklosa(at)gmail(dot)com> |
---|---|
To: | Marko Tiikkaja <marko(at)joh(dot)to> |
Cc: | Pg Bugs <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: BUG #14974: count doesn't accept text columns |
Date: | 2017-12-14 12:56:11 |
Message-ID: | CAJwgjNWqRO-EfMuppwAqC-ucoK2k1M=04e+ebfdrBr0gOkTaSQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Correct.
Thank you.
Regards
Jarek
14.12.2017 13:47 "Marko Tiikkaja" <marko(at)joh(dot)to> napisał(a):
> On Thu, Dec 14, 2017 at 2:33 PM, <jarek(dot)stoklosa(at)gmail(dot)com> wrote:
>
>> The following bug has been logged on the website:
>>
>> Bug reference: 14974
>> Logged by: Jarosław Stokłosa
>> Email address: jarek(dot)stoklosa(at)gmail(dot)com
>> PostgreSQL version: 9.6.6
>> Operating system: Linux
>> Description:
>>
>> create table test (t TEXT, tt TEXT);
>> insert into test values('a', 'b');
>> insert into test values('a', null::TEXT);
>> select t, count(tt) from test group by t;
>>
>> Should be (a, 1) but I've got a error message:
>> column "test.tt" must appear in the GROUP BY clause or be used in an
>> aggregate function
>>
>
> Works just fine here.
>
>
>> select t, count(distinct tt) from test group by t;
>> gives "DISTINCT specified, but count is not an aggregate function"
>>
>
> Are you sure you don't have a poorly-named "count" function defined?
> What's the output of:
>
> \df *.count
>
> from psql?
>
>
> .m
>
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2017-12-14 13:35:17 | Re: BUG #14963: Number of wal files are keep on increasing |
Previous Message | Marko Tiikkaja | 2017-12-14 12:52:47 | Re: BUG #14972: row duplicate on first SELECT from CTE (by JOIN/FOR UPDATE) from which UPDATE performed recently |