> Wrong ! The query should return 4 rows. In other words i don't know
> why postgres performs the following query:
I think the syntax you're looking for is UNION ALL.
select a,b from t1 union all (select distinct a,b from t2);
Чтобы сделать работу с сайтом удобнее, мы используем cookie и аналитический сервис «Яндекс.Метрика». Продолжая пользоваться сайтом, вы соглашаетесь с их использованием.