From: | Dmitriy Igrishin <dmitigr(at)gmail(dot)com> |
---|---|
To: | Thomas Kellerer <spam_eater(at)gmx(dot)net> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: A cronjob for copying a table from Oracle |
Date: | 2010-12-10 12:17:08 |
Message-ID: | AANLkTim_W8AKHs3-MiZQY4OnA695pSD3aBWLQQUW4NH_@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hey Thomas, Alexander
2010/12/10 Thomas Kellerer <spam_eater(at)gmx(dot)net>
> Alexander Farber, 10.12.2010 12:53:
>
> On Fri, Dec 10, 2010 at 12:33 PM, Thomas Kellerer<spam_eater(at)gmx(dot)net>
>> wrote:
>>
>>> And I'm not sure how to copy the Oracle's strange DATE
>>>> column best into PostgreSQL, without losing precision?
>>>>
>>>
>>> Oracle's DATE includes a time part as well.
>>>
>>> So simply use a timestamp in PostgreSQL and everything should be fine.
>>>
>>
>>
>> Yes, but how can I copy Oracle's DATE into PostgreSQL's timestamp?
>>
>> (I realize that this more an Oracle question, sorry)
>>
>> What format string should I take for Oracle's to_date() function,
>> I don't see a format string to get epoch seconds there
>>
>
> I have no idea what you are doing in PHP, but why don't you simply generate
> a valid date/time literal for Postgres using the to_char() function?
>
> Something like
>
> SELECT 'TIMESTAMP '''||to_char(QDATETIME, 'YYYY-MM-DD HH24:MI:SS')||''''
> FROM qtrack;
>
> That literal can directly be used in an INSERT statement for PostgreSQL
>
He asked exactly that.
>
> Regards
> Thomas
>
>
>
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
--
// Dmitriy.
From | Date | Subject | |
---|---|---|---|
Next Message | Henrique de Lima Trindade | 2010-12-10 12:47:36 | Using regexp_replace to remove small words |
Previous Message | Thomas Kellerer | 2010-12-10 12:14:06 | Re: A cronjob for copying a table from Oracle |