Search Postgresql Archives

Re: Auto convert for type?

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

 



karly@xxxxxxxxxxxxx writes:
> Yes, that's what I'm looking for.  How can I create an IMPLICIT
> cast from date to my custom type?  IOW, if I assing a date to a
> varible of my type, it will be converted to the format I specify.

Make a function that does the conversion the way you want, and then
create a cast that uses the function (see CREATE CAST).

			regards, tom lane


[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