VIEWS, DISTINCT and COUNT
От | Brian Hirt |
---|---|
Тема | VIEWS, DISTINCT and COUNT |
Дата | |
Msg-id | 19991103181331.A8318@loopy.berkhirt.com обсуждение исходный текст |
Ответы |
Re: [HACKERS] VIEWS, DISTINCT and COUNT
Re: [HACKERS] VIEWS, DISTINCT and COUNT |
Список | pgsql-hackers |
Okay, I'm used to a feature that allows combining count and distinct in Sybase. I thought it was standard SQL and expected to see it in Postgres. Whatever the case might be, postgres does not seem to support this. I keep running into queries that I cannot write. Here's the skinny: "select count(distinct id) from table" is not supported. Getting this information without count(distinct id) support is a pain and always seems to require creating temporary table and running queries later. My first solution was to create a view that just selected the distinct colmuns that I was interested in and then do a count on that table. This too seems impossible. For both count(distinct) and distinct in views, I have this question: Is this something that needs to be supported but just never got implemented? Or, is it something that was conciously excluded? If nobody is working on these, I may take a look them and pick the easier to implement. What little I know about the way postgres works, I expect the first one would be esier. -- The world's most ambitious and comprehensive PC game database project. http://www.mobygames.com
В списке pgsql-hackers по дате отправления: