Re: Date format for bulk copy - Mailing list pgsql-general

From Michael Fuhr
Subject Re: Date format for bulk copy
Date
Msg-id 20041014154749.GB95346@winnie.fuhr.org
Whole thread Raw
In response to Re: Date format for bulk copy  (David Rysdam <drysdam@ll.mit.edu>)
List pgsql-general
On Wed, Oct 13, 2004 at 03:37:14PM -0400, David Rysdam wrote:
> Michael Fuhr wrote:
> >
> >I'd probably choose to extend PostgreSQL rather than hack what
> >already exists, though.
>
> By "extend PostgreSQL" do you mean create a custom input_function for
> timestamp?  Are there docs that give hints for replacing the input
> function of an existing type?  Someone else replied similarly, but I'm
> afraid I'm not familiar enough with PG to decipher it all.

I'd been thinking about your idea of creating a custom type or
providing a custom input function for a standard type.  I've
done simple tests where I updated a type's typinput field in
pg_catalog.pg_type and it worked, but I don't know what problems
that might cause.  One thing that comes to mind is that I don't
know if pg_dump/pg_dumpall would recognize such a change for a
standard type.  The more I think about it, the less I'm convinced
that it's a good idea.

I like Pierre-Fr�d�ric Caillaud's suggestion to have a
filter script query the database for field positions and types
and reformat the fields as appropriate.  That would allow the
filter to have knowledge of which fields should be reformatted
without having to program that logic explicitly.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

pgsql-general by date:

Previous
From: Thomas Hallgren
Date:
Subject: Verifying a user.
Next
From: Scott Cain
Date:
Subject: Re: creating audit tables