Thread: Date representation

Date representation

From
noy
Date:
Hi,

I having some problem with the date fields migration from 7.1.3 version to 7.2
version...

In my current version PostgreSQL 7.1.3 on i686-pc-linux-gnu, compiled by GCC
2.96 I get this result

select now();
          now
------------------------
 2002-04-11 12:58:33+02
(1 row)


In the new version  PostgreSQL 7.2 on i686-pc-linux-gnu, compiled by GCC 2.96

SELECT NOW();
              now
-------------------------------
 2002-04-11 13:02:27.943119+02
(1 row)


The date is different in the last part:

2002-04-11 13:02:27.943119+02
         ^^^^^^^^^
Then when I am trying to update this field from ACCESS I have an error and the
entry can't be updated because the dates are not equals.

Someone can help me?

Thanks.

Re: Date representation

From
Jean-Michel POURE
Date:
Le Jeudi 11 Avril 2002 13:19, noy a écrit :
> Then when I am trying to update this field from ACCESS I have an error and
> the entry can't be updated because the dates are not equals.

Dear Noy,

M$ Access2K relies on timestamps to update fields and 7.3 replaces timestamp
-> timestamptz. Are there any timestamp in your table or only dates? Maybe
you could copy table definition in your mail?

By the way, did you upgrade pgAdmin2 and odbc driver to the latest version?

Cheers,
Jean-Michel

Re: Date representation

From
noy
Date:
Jean-Michel POURE wrote:
>
> M$ Access2K relies on timestamps to update fields and 7.3 replaces timestamp
> -> timestamptz. Are there any timestamp in your table or only dates? Maybe
> you could copy table definition in your mail?

Here is an example of the table definition. I use the timestamptz

CREATE TABLE "EMPLOYEE_SYSTEM" (
    "EMP_ID" integer,
    "EMP_EMAIL" character varying(80),
    "EMP_TIMESTAMP" timestamp with time zone,
);


> By the way, did you upgrade pgAdmin2 and odbc driver to the latest version?

Yes, I upgrade the driver version in windows.

Thanks a lot!

Re: Date representation

From
Jean-Michel POURE
Date:
> CREATE TABLE "EMPLOYEE_SYSTEM" (
>         "EMP_ID" integer,
>         "EMP_EMAIL" character varying(80),
>         "EMP_TIMESTAMP" timestamp with time zone,
> );

Your schema is correct (timestamp with time zone = timestamptz).

> > By the way, did you upgrade pgAdmin2 and odbc driver to the latest
> > version? Yes, I upgrade the driver version in windows.

Try Advanced options in ODBC and enable / disable fake index and row
versioning. Does it make it?

This problem is Access2K related: Access 2K need a timestamp value to update
records. As far as I know, this used to be the case in 7.1...

Maybe something changed since 7.1. Any idea Dave?


Cheers,
Jean-Michel

Re: Date representation

From
Dave Page
Date:

> -----Original Message-----
> From: Jean-Michel POURE [mailto:jm.poure@freesurf.fr]
> Sent: 11 April 2002 15:10
> To: noy
> Cc: pgadmin-hackers@postgresql.org
> Subject: Re: [pgadmin-hackers] Date representation
>
>
> > CREATE TABLE "EMPLOYEE_SYSTEM" (
> >         "EMP_ID" integer,
> >         "EMP_EMAIL" character varying(80),
> >         "EMP_TIMESTAMP" timestamp with time zone,
> > );
>
> Your schema is correct (timestamp with time zone = timestamptz).
>
> > > By the way, did you upgrade pgAdmin2 and odbc driver to
> the latest
> > > version? Yes, I upgrade the driver version in windows.
>
> Try Advanced options in ODBC and enable / disable fake index and row
> versioning. Does it make it?
>
> This problem is Access2K related: Access 2K need a timestamp
> value to update
> records. As far as I know, this used to be the case in 7.1...
>
> Maybe something changed since 7.1. Any idea Dave?

I think it's a PostgreSQL thing, rather than Access or psqlODBC. Now() is
returning much higher precision in the seconds than previously. May be a
post to pgsql-general@postgresql.org would help.

Regards, Dave.