Search Postgresql Archives

Re: Custom integer-like type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ivan Voras <ivoras@xxxxxxxxxxx> writes:
> 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)

What you'd need for that is an assignment cast from integer to myint.
Literal 1 is an integer, period; it's not going to get fed to your
type's input routine.

			regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux