Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Auto convert for type?



karly(at)kipshouse(dot)org 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



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group