Re: [HACKERS] I think we need an explicit parsetree node for CAST

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] I think we need an explicit parsetree node for CAST
Дата
Msg-id 24791.948058358@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] I think we need an explicit parsetree node for CAST  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: [HACKERS] I think we need an explicit parsetree node for CAST  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
>> Right, you saw the parser_typecast mistake.  But the problem of doing
>> it properly for non-constant input to the CAST is still open.

BTW, the strings regress test is currently failing in a couple of
places, because it thinks that casting to "char" won't truncate the
string.  With this patch in place, casting a constant to "char" means
casting to char(1) which indeed truncates to one character.  I think
this is correct behavior, though it may surprise someone somewhere.

There are other places in the strings test that cast non-constant
expressions to "char", and those are going to change behavior as soon
as I finish inventing a parsenode for CAST.  So I am not going to bother
checking in an update for the strings test until the dust settles.

> Yes, and constants with cases in SELECT INTO are broken too.

Huh?  I'm not sure if I follow this or not --- would you give an
example?
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] pg_dump not in very good shape
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] I think we need an explicit parsetree node for CAST