INSERT with GROUP

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема INSERT with GROUP
Дата
Msg-id 199803010540.AAA09461@candle.pha.pa.us
обсуждение исходный текст
Список pgsql-hackers
Looks like I don't have this fixed, so I have re-added it to the FAQ.

test=> create table xx (x int, y int) ;
CREATE
test=> insert into xx select usesysid, count(*) from pg_user group by
usesysid;
ERROR:  The field being grouped by must appear in the target list

In this case, the group by the parser is checking for is x and y, not
the results of the select, so it fails.

--
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Rule plan size for views?
Следующее
От: "Billy G. Allie"
Дата:
Сообщение: pg_atoi patch for postgreSQL 6.3.