| От | Willy-Bas Loos |
|---|---|
| Тема | Re: auto-increment in a view |
| Дата | |
| Msg-id | 1dd6057e0909031003g3cc29977wec23c9942f010c1a@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: auto-increment in a view (Raymond O'Donnell <rod@iol.ie>) |
| Список | pgsql-general |
> Just a wild notion, but would the generate_series function be any use to > you? Good idea, but i can't get it to work. create or replace view testview3 as ( select generate_series(1,(select count(*) from test group by "value")), value from test group by value); select * from testview3 limit 5; --ERROR: more than one row returned by a subquery used as an expression When i put the generate_series in the FROM clause, the results will be matched "everything to everything". I guess the windowing function is the way to go. Thx, WBL -- "Patriotism is the conviction that your country is superior to all others because you were born in it." -- George Bernard Shaw
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера