Good time of day!
I've got some strangeness/bug when working with my own datatype in
PostgreSQL.
Here's a short description of the sitiation:
I've developed a 1-byte integer datatype (let's call it "int1").
The input and output functions for this datatype I wrote myself.
Everything works just fine except for the following:
I create a table "test_int1" with two columns "i4" and "i1" of type "int4"
and "int1" respectively.
When I insert a new row into this table without providing a value for the
"i1" column, I get a value of "45" in it.
The column doesn't have any default values. Neither it has "not null" option
set.
If I explicitly provide a NULL value for this column in an insertion
statement, I get what I expect - a NULL value for the column.
Not-supplying a value for any original PGSQL datatype (say, "int4") also
makes it correctly - I see a NULL value.
Any comments/suggestions?
I have PostgreSQL 7.0.3 on FreeBSD 4.2-STABLE.
Best regards.
Konstantin Solodovnikov.