From: | Солодовников Константин <ks(at)tcnet(dot)ru> |
---|---|
To: | "'pgsql-bugs(at)postgresql(dot)org'" <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Strangeness/bug when working with my own datatype in PostgreSQL |
Date: | 2001-02-24 23:47:26 |
Message-ID: | D078291436B0D411B08800805F6D131501E55D@fantom.tcnet.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
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.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2001-02-25 04:36:54 | Re: Strangeness/bug when working with my own datatype in PostgreSQL |
Previous Message | Tom Lane | 2001-02-24 15:56:08 | Re: Lock Detection (was: pg_dump failing on LinuxPPC) |