Re: Evidently no support for the mmddyyyy date format

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: bfb21(at)comcast(dot)net, pgsql-general(at)postgresql(dot)org, rod(at)iol(dot)ie
Subject: Re: Evidently no support for the mmddyyyy date format
Date: 2009-04-10 15:21:09
Message-ID: 200904101521.n3AFL9Q28417@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Pavel Stehule wrote:
> 2009/4/10 <bfb21(at)comcast(dot)net>:
> > Yes, I mentioned that I could use the to_date function, but as I said, that
> > would involve a LOT of changes to a LOT of source code, which I'm trying to
> > avoid.
> >
>
> other solution is custom datatype. It isn't too much work, but it is
> coding in C.

Yep, that was my first idea too. You would copy an existing data type,
and modify just the _input_ routine to handle input with no delimiters.
I would simply add the delimiters and pass the string to the original
input function; it really isn't that much work. The only downside is
that you have to create/use a custom data type for this.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Browse pgsql-general by date

  From Date Subject
Next Message A.M. 2009-04-10 15:44:13 Re: Querying a Large Partitioned DB
Previous Message Tom Lane 2009-04-10 15:20:41 Re: Multiple character encodings within a single database/table?