When I create a table create table test (a bit(4)); and insert a value insert into test values (b'1000000001'); the zpbit_in() function gets an atttypmod (arg 2 (of 2)) of -1. Is there somewhere the system needs to be told that "this type uses the atttypmod field"? -- Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter
Peter Eisentraut <peter_e@gmx.net> writes:
> When I create a table
> create table test (a bit(4));
> and insert a value
> insert into test values (b'1000000001');
> the zpbit_in() function gets an atttypmod (arg 2 (of 2)) of -1. Is there
> somewhere the system needs to be told that "this type uses the atttypmod
> field"?
No. I don't believe this is broken, either --- the call is coming from
make_const() which has no reason to try to coerce the constant to a
particular length. Coercion to the target column width will happen
later (quite a bit later), when zpbit() is called. See
coerce_type_typmod in parse_coerce.c.
regards, tom lane
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера