Re: Implementation of Date/Time Input Interpretation

From: Francis Markham <fmarkham(at)gmail(dot)com>
To: Dann Corbit <DCorbit(at)connx(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Implementation of Date/Time Input Interpretation
Date: 2010-06-23 02:27:41
Message-ID: AANLkTinuPqwh0B7iaF618T16P2UdHm4cZ5rlEbgz0Fq6@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thank you for your prompt reply.

> What is it exactly that you are trying to accomplish?

I want to be able to, from my own script, determine if postgres will
be able to interpret a string as a date or time. If you can suggest a
better way of accomplishing this beyond reimplementing your algorithm
I would be happy to hear it!

Cheers,

Francis Markham

On 23 June 2010 12:21, Dann Corbit <DCorbit(at)connx(dot)com> wrote:
>
> From: pgsql-hackers-owner(at)postgresql(dot)org [mailto:pgsql-hackers-owner(at)postgresql(dot)org] On Behalf Of Francis Markham
> Sent: Tuesday, June 22, 2010 7:13 PM
> To: pgsql-hackers(at)postgresql(dot)org
> Subject: [HACKERS] Implementation of Date/Time Input Interpretation
>
>
>
> Greetings all,
>
> I am currently implementing a script to import data into postgres.  I would like to apply the algorithm to detect date and time values, outlined at http://developer.postgresql.org/pgdocs/postgres/datetime-input-rules.html
>
> However, I am unfamiliar (and somewhat intimidated) by the postgres source tree.  Would any kind person be able to point me to the source file(s) that implement the above algorithm?
> >>
>
> You will find it under \src\backend\utils\adt\datetime.c
>
> To import data into postgres, I guess that reading the date time routine is probably not what you want to do.
>
> If you want to move the data in using a compiled program then use an ODBC driver.  PostgreSQL comes with a free one.  OLEDB is another sensible alternative.  Or JDBC if you want to use Java.
>
> If you want to bulk load lots of data at high speed, read up on the COPY command.
>
> If you just want to insert some rows using SQL, then simply perform an INSERT using PSQL  or some other interface of your choice.
>
> What is it exactly that you are trying to accomplish?
>
> <<

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Chris 2010-06-23 02:41:13 testing plpython3u on 9.0beta2
Previous Message Dann Corbit 2010-06-23 02:21:17 Re: Implementation of Date/Time Input Interpretation