Re: New CORRESPONDING clause design
От | Pavel Stehule |
---|---|
Тема | Re: New CORRESPONDING clause design |
Дата | |
Msg-id | CAFj8pRBEQ7FWn1wKjLHDh9Y9_HynTyJYyFTdTjSmNhbQVDhkUQ@mail.gmail.com обсуждение исходный текст |
Ответ на | [HACKERS] New CORRESPONDING clause design (Surafel Temsgen <surafel3000@gmail.com>) |
Ответы |
Re: New CORRESPONDING clause design
|
Список | pgsql-hackers |
Hi
2017-03-30 13:11 GMT+02:00 Surafel Temesgen <surafel3000@gmail.com>:
hiThank you very much for your help .here is the patch fix that issue as you suggest
The crash is fixed
I did a rebase + few more regress tests.
Is following use case defined in standard?
postgres=# SELECT 0 AS x1, 1 AS a, 0 AS x2, 2 AS b, 0 AS x3, -1 AS x3
UNION ALL CORRESPONDING BY(a,b) SELECT 4 AS b, 0 AS x4, 3 AS a, 0 AS x6, -1 AS x6
UNION ALL CORRESPONDING SELECT 0 AS x8, 6 AS a, -100 AS aa;
┌───┐
│ a │
╞═══╡
│ 1 │
│ 3 │
│ 6 │
└───┘
(3 rows)
It depends on order of implementation
if we do (T1 U T2) U T3 ---> then result is correct,
but if we do T1 U (T2 U T3) ---> than it should to fail
I am not sure, if this result is expected (correct). I expect more syntax error because corresponding by is not filled.
RegardsSurafelOn Tue, Mar 28, 2017 at 5:44 PM, Pavel Stehule <pavel.stehule@gmail.com> wrote:2017-03-28 14:18 GMT+02:00 Pavel Stehule <pavel.stehule@gmail.com>:2017-03-28 13:58 GMT+02:00 Surafel Temesgen <surafel3000@gmail.com>:can you help with fixing it Pavel?There must be some new preanalyze stage - you have to know result columns before you are starting a analyzemaybe some recheck after analyze stage to remove invalid columns can be good enough.RegardsPavelRegardsPavelOn Mon, Mar 27, 2017 at 11:48 AM, Pavel Stehule <pavel.stehule@gmail.com> wrote:Hifresh update - I enhanced Value node by location field as Tom proposal.Few more regress tests.But I found significant issue, that needs bigger fix - Surafel, please, can you fix it.It crash onSELECT 0 AS x1, 1 AS a, 0 AS x2, 2 AS b, 0 AS x3, -1 AS x3UNION ALL CORRESPONDING SELECT 4 AS b, 0 AS x4, 3 AS a, 0 AS x6, -1 AS x6UNION ALL CORRESPONDING SELECT 0 AS x8, 6 AS b, -100 AS x9;I'll mark this patch as waiting on authorRegardsPavel
Вложения
В списке pgsql-hackers по дате отправления: