Re: [HACKERS] DEFAULT fixed
От | Tom Lane |
---|---|
Тема | Re: [HACKERS] DEFAULT fixed |
Дата | |
Msg-id | 7378.927384351@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | DEFAULT fixed (Bruce Momjian <maillist@candle.pha.pa.us>) |
Ответы |
Re: [HACKERS] DEFAULT fixed
Re: [HACKERS] DEFAULT fixed |
Список | pgsql-hackers |
Bruce Momjian <maillist@candle.pha.pa.us> writes: > Does anyone have an opinion on this? Why does only DEFAULT have this > problem? Does anyone know how inserts of '' into char() fields get > padded with the proper atttypmod value? Do I need to pass atttypmod to > all the functions that call parse_coerce, so I can pass a value for all > cases? Possibly DEFAULT is the only case where the constant value created by the parser will get shoved directly into a tuple with no run-time coercion? That's strictly a guess. I agree this issue needs to be looked at more closely. Now that we know the problem comes from missing atttypmod info, it seems likely that related failures can occur for NUMERIC and other types that depend on atttypmod. (Are there any such types? Even if there aren't now, there will probably be more and more in future.) It might be best to just bite the bullet and make the parser carry around both the type's OID and typmod at all times. regards, tom lane
В списке pgsql-hackers по дате отправления: