Dave Blasby <dblasby(at)refractions(dot)net> writes:
> CREATE TABLE test_table (myint integer, mydata MY_DATATYPE);
> INSERT INTO test_table VALUES (1);
> At this point, I'd expect there to be one row in test table. The myint
> column will have the value one, and the mydata column will have the
> value NULL.
> This doesnt appear to be the case. It seems that the mydata column will
> have a structure that looks like a '-'::TEXT structure (ie. the first 4
> bytes are an int representing 5, and the 5th byte is the ASCII '-').
Uh, what did your CREATE TYPE command look like, exactly? This sounds
like you specified a default value for the datatype.
Maybe you need to show us your datatype's I/O functions, too. Since
this works perfectly fine for the standard variable-length datatypes,
it's hard to arrive at any other conclusion than that your custom
datatype code is erroneous. But there's not enough info here to figure
out just what is wrong with it.
regards, tom lane
In response to
pgsql-hackers by date
|Next:||From: Bruce Momjian||Date: 2001-09-03 20:17:54|
|Subject: Re: OpenFTS (Open Source Full Text Search engine) pre-announce|
|Previous:||From: johan27||Date: 2001-09-03 19:02:33|
|Subject: BIG problem !!:fatal 1:set user id user admin is not in eg shadow|