| От | Thomas Kellerer |
|---|---|
| Тема | Re: group by does not show error |
| Дата | |
| Msg-id | jkk1gd$vf$1@dough.gmane.org обсуждение исходный текст |
| Ответ на | group by does not show error (AI Rumman <rummandba@gmail.com>) |
| Список | pgsql-general |
AI Rumman wrote on 24.03.2012 09:06: > I am using Postgresql 9.1.0. > > I found that following GROUP BY query works in my DB :- > > \d t1 > Table "public.t1" > Column | Type | Modifiers > --------+---------+----------- > i | integer | not null > nam | text | > Indexes: > "t1_pkey" PRIMARY KEY, btree (i) > > > select i,nam > from t1 > group by i; > > i | nam > ---+----- > (0 rows) > > > I think the query should show an error as I did not maintain group by standard. > Does anyone know why it does not show syntax error? That's an enhancement in 9.1 As you included the primary key in the group by clause the rows are going to be unique anyway and no additional columns arenecessary.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера