Re: MySQL -> PostgreSQL conversion issue

From: DM <dm(dot)aeqa(at)gmail(dot)com>
To: Alban Hertroys <dalroi(at)solfertje(dot)student(dot)utwente(dot)nl>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: MySQL -> PostgreSQL conversion issue
Date: 2011-08-21 03:13:06
Message-ID: CAO0A+Lg_K-h9k_HF4oB0eKsUwK9AbsVSrkiu1XpG71TDS8yg-w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thank you for your reply, sorry for the late response, your reply really
helped me.

Thanks
Deepak

On Fri, Aug 19, 2011 at 11:39 AM, Alban Hertroys <
dalroi(at)solfertje(dot)student(dot)utwente(dot)nl> wrote:

> On 19 Aug 2011, at 14:50, DM wrote:
>
> > Hi All,
> >
> > how to insert mysql (datetime interval) data to postgrres interval
> datatype.
> >
> > mysql
> > | test_interval | datetime | YES | | 1970-01-02 00:00:00 |
> |
> >
> > psql
> > test_interval | interval |
> >
> >
> > any solution for this?
>
> I think you want something like this?:
>
> development=> select '1970-01-02 00:00:00'::timestamp without time zone -
> '1970-01-01 00:00:00'::timestamp without time zone;
> ?column?
> ----------
> 1 day(1 row)
>
> Midnight 1970-01-01 being the baseline for their calculations is a bit of a
> guess, but that seems to make sense with the example you gave.
> You probably don't want postgres to be smart with your client's time zone
> settings, hence the "without time zone".
>
> Alban Hertroys
>
> --
> Screwing up is an excellent way to attach something to the ceiling.
>
>
> !DSPAM:1293,4e4eadd212091422813852!
>
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dondi Michael Stroma 2011-08-21 06:08:37 record-based log shipping
Previous Message Edoardo Panfili 2011-08-20 06:58:35 Re: A questions on planner choices