Re: Auto convert for type?

From: karly(at)kipshouse(dot)org
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Auto convert for type?
Date: 2006-03-28 21:11:42
Message-ID: 20060328131142.B21900@kipshouse.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Mar 28, 2006 at 03:34:18PM -0500, Tom Lane wrote:
> karly(at)kipshouse(dot)org writes:
> > but that syntax doesn't work. I thought I might be able to create
> > my own type, and have an implicit conversion of DATE,
>
> You can *make* an implicit cast from (or to) DATE, but there won't be
> one made for you.

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.
I don't seem to be able to find that in the online doc, though I'm sure
it's there somewhere.

Thanks

-karl

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2006-03-28 21:22:00 Re: PostgreSQL support on Redhat Advance Server 2.1
Previous Message brew 2006-03-28 21:11:13 Re: best practice in upgrading db structure