Re: Evidently no support for the mmddyyyy date format - Mailing list pgsql-general

From Bruce Momjian
Subject Re: Evidently no support for the mmddyyyy date format
Date
Msg-id 200904101521.n3AFL9Q28417@momjian.us
Whole thread Raw
In response to Re: Evidently no support for the mmddyyyy date format  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-general
Pavel Stehule wrote:
> 2009/4/10  <bfb21@comcast.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@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

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

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Querying a Large Partitioned DB
Next
From: Tom Lane
Date:
Subject: Re: Multiple character encodings within a single database/table?