Re: Odd error in complex query (7.2): Sub-SELECT
| От | Hannu Krosing |
|---|---|
| Тема | Re: Odd error in complex query (7.2): Sub-SELECT |
| Дата | |
| Msg-id | 3BDE6838.286B8A84@tm.ee обсуждение исходный текст |
| Ответ на | Odd error in complex query (7.2): Sub-SELECT uses un-GROUPed... (Philip Warner <pjw@rhyme.com.au>) |
| Ответы |
Re: Odd error in complex query (7.2): Sub-SELECT
|
| Список | pgsql-hackers |
Philip Warner wrote: > > At 14:36 29/10/01 -0500, Tom Lane wrote: > >Philip Warner <pjw@rhyme.com.au> writes: > >> Sorry for the convoluted example: > > > >A simplified example is > > And here's a simpler one that seems to avoid views altogether: > > create table lkp(f1 int); > create table t1(f1 int, x int); > > Select > case when Exists(Select * From lkp where lkp.f1 = t1.f1) then > 'known' > else > 'unknown' > end as status, > sum(x) > from t1 > group by 1; > A bit off-tppic question, but is our optimiser smart enough to recognize the query inside exists as LIMIT 1 query ? ------------ Hannu
В списке pgsql-hackers по дате отправления: