Error with views containing sub-queries with distinct
От | Sean P. Thomas |
---|---|
Тема | Error with views containing sub-queries with distinct |
Дата | |
Msg-id | 3F9003E6.1050601@ulanji.com обсуждение исходный текст |
Ответы |
Re: Error with views containing sub-queries with distinct
Re: Error with views containing sub-queries with distinct |
Список | pgsql-hackers |
Last night I just upgraded to a nightly snapshot of 7.4 and noticed an error on queries that had previously worked (in version 7.3.x and previous 7.4's snapshots up to about a month old). I have a view that I can distill into a base case of: CREATE VIEW testing_v AS SELECT table_a.* FROM table_a WHERE (table_a.some_id IN ( SELECT DISTINCT table_b.some_id FROM table_b )); When I do : select * from testing_v; I get: JOIN qualification may not refer to other relations I have found that if I remove the distinct on the sub-query, it behaves as expected. Yes, I know the distinct is probably useless but we are in the process of porting it to postgres and have lots of cleanup left. We are migrating from a commercial database (and paid good money) and found postgres to be a joy (substantially fast, less gotchas, better at embeding business logic at db level). Thank you very much. I appreciate all the effort that has put into such a great product. --spt PS: Please cc me as I am not on list.
В списке pgsql-hackers по дате отправления: