Re: BUG #7644: Missing implicit types of Result and failing type-conversion
В списке pgsql-bugs по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: BUG #7644: Missing implicit types of Result and failing type-conversion |
| Дата | |
| Msg-id | 8891.1352560824@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | BUG #7644: Missing implicit types of Result and failing type-conversion (rep.dot.nop@gmail.com) |
| Ответы |
Re: BUG #7644: Missing implicit types of Result and failing type-conversion
|
| Список | pgsql-bugs |
rep.dot.nop@gmail.com writes:
> select distinct on (bug) bug
> from (
> select * from (select 'string one' AS bug from generate_series(0,1))
> s1
> UNION
> select * from (select 'string two' bug from generate_series(0,0))
> s2
> ) x
> ;
> ERROR: could not determine which collation to use for string comparison
> HINT: Use the COLLATE clause to set the collation explicitly.
> What am i missing or doing wrong?
Leaving out the cast. An undecorated string literal is not a constant
of type text --- it is a constant of unknown type, and the parser will
throw an error if the type can't be resolved from fairly-local context.
(The same applies to NULL, btw.)
regards, tom lane
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера