Custom integer-like type - Mailing list pgsql-general

From Ivan Voras
Subject Custom integer-like type
Date
Msg-id k2vhva$1tg$1@ger.gmane.org
Whole thread Raw
Responses Re: Custom integer-like type
List pgsql-general
Hello,

I'm creating a new data in C, and everything is proceeding well, except
that the data type should be parsed on input like an integer. Maybe it's
best if I explain it with an example:

Currently, I can do this:

INSERT INTO t(my_data_type) VALUES ('1')

but I cannot do this:

INSERT INTO t(my_data_type) VALUES (1)

My type is defined as:

CREATE TYPE myint (
   internallength = variable,
   input = encbigint_in,
   output = encbigint_out,
   alignment = int4,
   storage = external
);

(The "variable" length is correct in this case.)


Attachment

pgsql-general by date:

Previous
From: Steve Crawford
Date:
Subject: Re: Need help in reclaiming disk space by deleting the selected records
Next
From: Tom Lane
Date:
Subject: Re: Custom integer-like type