Subselects lack functionality

Поиск
Список
Период
Сортировка
От pgsql-bugs@postgresql.org
Тема Subselects lack functionality
Дата
Msg-id 200009282201.e8SM1cE11526@hub.org
обсуждение исходный текст
Ответы Re: Subselects lack functionality  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Kuba Ober (winnie@hoth.amu.edu.pl) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
Subselects lack functionality

Long Description
1.
Subselects don't allow one to use tuple set operators like UNION, INTERSECT, EXCEPT. It forces one to select the
resultsinto a temp table. 
2.
It would be gr8 if single column subselects would allow themselves to be treated the same way as lists do as right-side
argumentsof IN operator. 
This would allow e.g. much more powerful DELETE statement, like
DELETE FROM table WHERE id IN (SELECT ...)
3.
Subselects cannot be used as arguments to aggregation functions - I presume this is very weird and not expected at all,
butI had such an idea. 

I don't know if it is expected behaviour (standards?), this should be explained in the docs (or am I searching in the
wrongplace?) 


Sample Code
select (select id from table1 except select table1.id where expression) as id;

(assuming that subselect would result just one tuple)

No file was uploaded with this report

В списке pgsql-bugs по дате отправления:

Предыдущее
От: pgsql-bugs@postgresql.org
Дата:
Сообщение: very poorly optimised query
Следующее
От: Lamar Owen
Дата:
Сообщение: Re: Subselects lack functionality