Re: syntax pb
От | Marc Millas |
---|---|
Тема | Re: syntax pb |
Дата | |
Msg-id | CADX_1aZaUNLBjfkVAA02rkx8vJWUrVORXS38Ubj4+8T6G5r5Bw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: syntax pb (Adrian Klaver <adrian.klaver@aklaver.com>) |
Ответы |
Re: syntax pb
Re: syntax pb Re: syntax pb |
Список | pgsql-general |
The above should have been:
Insert into t2 (a, b, c, d)
Select distinct test1.t, 'abc' as b, NULL::text, NULL::numeric
From t1 test1;
>
> which results in:
>
> select * from t2;
> a | b | c | d
> --------+-----+------+------
> azerty | abc | NULL | NULL
>
>
Thanks Adrian, but if the query becomes more complex, for example with a few joins more, then even casting doesn't work.
This comes from a prod environment and even casting NULLs (which is more than strange, BTW) generates absurd errors.
Too my understanding it looks like the parser did not parse the select distinct as we think he does.
>> Marc MILLAS
>> Senior Architect
>> +33607850334
>> www.mokadb.com <http://www.mokadb.com>
>>
>
--
Adrian Klaver
adrian.klaver@aklaver.com
В списке pgsql-general по дате отправления: