Re: Adding time to DATE type
От | Tom Lane |
---|---|
Тема | Re: Adding time to DATE type |
Дата | |
Msg-id | 1512.960829800@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Adding time to DATE type (Peter Eisentraut <peter_e@gmx.net>) |
Ответы |
Re: Adding time to DATE type
Re: Adding time to DATE type |
Список | pgsql-hackers |
Peter Eisentraut <peter_e@gmx.net> writes: > Bruce Momjian writes: >> Can someone give me a TODO summary for this issue? > * make 'text' constants default to text type (not unknown) > (I think not everyone's completely convinced on this issue, but I don't > recall anyone being firmly opposed to it.) It would be a mistake to eliminate the distinction between unknown and text. See for example my just-posted response to John Cochran on pgsql-general about why 'BOULEVARD'::text behaves differently from 'BOULEVARD'::char. If string literals are immediately assigned type text then we will have serious problems with char(n) fields. I think it's fine to assign string literals a type of 'unknown' initially. What we need to do is add a phase of type resolution that considers treating them as text, but only after the existing logic fails to deduce a type. (BTW it might be better to treat string literals as defaulting to char(n) instead of text, allowing the normal promotion rules to replace char(n) with text if necessary. Not sure if that would make things more or less confusing for operations that intermix fixed- and variable-width char types.) regards, tom lane
В списке pgsql-hackers по дате отправления: