Re: unhelpful error message
| От | Tom Lane |
|---|---|
| Тема | Re: unhelpful error message |
| Дата | |
| Msg-id | 6912.1245333801@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | unhelpful error message (hubert depesz lubaczewski <depesz@depesz.com>) |
| Ответы |
Re: unhelpful error message
Re: unhelpful error message |
| Список | pgsql-bugs |
hubert depesz lubaczewski <depesz@depesz.com> writes:
> # create table sold_products (items int4, product_id int4);
> # create table products (id int4, codename text);
> # select sp.count, p.codename from sold_products sp join products p on sp.product_id = p.id;
> shown error:
> ERROR: column "p.codename" must appear in the GROUP BY clause or be used in an aggregate function
> LINE 1: select sp.count, p.codename from sold_products sp join produ...
> ^
Per the fine manual, sp.count is another way of writing count(sp).
Does it make more sense now?
regards, tom lane
В списке pgsql-bugs по дате отправления: