Re: zpbit_in does not receive correct atttypmod

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: zpbit_in does not receive correct atttypmod
Date: 2001-04-26 22:35:31
Message-ID: 25776.988324531@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Lockhart 2001-04-26 23:03:51 Re: PAM Authentication for PostgreSQL...
Previous Message Tom Lane 2001-04-26 22:24:10 Re: status after 7.1 and pgcrypto update / crypt(table.field) ?