Lists: | pgsql-odbc |
---|
From: | Popovics Attila <apopovics(at)interm(dot)gtk(dot)gau(dot)hu> |
---|---|
To: | pgsql-odbc(at)postgresql(dot)org |
Subject: | Read-only records with timestamp |
Date: | 2002-04-29 11:00:44 |
Message-ID: | Pine.LNX.4.44.0204291215480.31500-100000@interm.gtk.gau.hu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-odbc |
Hi
I have some tables with timestamp field
(timestamp with time zone | default now()).
It worked well in 7.1.3, but in 7.2.1 the newly inserted records are
read only through the odbc (MS Access, pgAdmin 1.2.0).
I analized the log files and I found that:
on update or on delete the client sends string like this
'update .... set .... where ... and "idoppont" = '2002-04-26 14:05:17.44'::timestamp'
but
in plsql in same record
the value of the field is 2002-04-26 14:05:17.440044+02
end finally
select '2002-04-26 14:05:17.44'::timestamp;
timestamptz
---------------------------
2002-04-26 14:05:17.44+02
What I have to do to eliminate this problem?
Thanks
Attila Popovics
From: | "Peter Darley" <pdarley(at)kinesis-cem(dot)com> |
---|---|
To: | "Popovics Attila" <apopovics(at)interm(dot)gtk(dot)gau(dot)hu>, <pgsql-odbc(at)postgresql(dot)org> |
Subject: | Re: Read-only records with timestamp |
Date: | 2002-04-29 13:57:43 |
Message-ID: | NNEAICKPNOGDBHNCEDCPGEBFCIAA.pdarley@kinesis-cem.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-odbc |
Attila,
What has worked for me is to change the data type in the table to a
timestamp(0), so it doesn't have too high a precision for the ODBC driver.
Thanks,
Peter Darley
-----Original Message-----
From: pgsql-odbc-owner(at)postgresql(dot)org
[mailto:pgsql-odbc-owner(at)postgresql(dot)org]On Behalf Of Popovics Attila
Sent: Monday, April 29, 2002 4:01 AM
To: pgsql-odbc(at)postgresql(dot)org
Subject: [ODBC] Read-only records with timestamp
Hi
I have some tables with timestamp field
(timestamp with time zone | default now()).
It worked well in 7.1.3, but in 7.2.1 the newly inserted records are
read only through the odbc (MS Access, pgAdmin 1.2.0).
I analized the log files and I found that:
on update or on delete the client sends string like this
'update .... set .... where ... and "idoppont" = '2002-04-26
14:05:17.44'::timestamp'
but
in plsql in same record
the value of the field is 2002-04-26 14:05:17.440044+02
end finally
select '2002-04-26 14:05:17.44'::timestamp;
timestamptz
---------------------------
2002-04-26 14:05:17.44+02
What I have to do to eliminate this problem?
Thanks
Attila Popovics
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
From: | Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp> |
---|---|
To: | Popovics Attila <apopovics(at)interm(dot)gtk(dot)gau(dot)hu> |
Cc: | pgsql-odbc(at)postgresql(dot)org |
Subject: | Re: Read-only records with timestamp |
Date: | 2002-04-30 23:34:23 |
Message-ID: | 3CCF29FF.C37060D6@tpf.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-odbc |
Popovics Attila wrote:
>
> Hi
> I have some tables with timestamp field
> (timestamp with time zone | default now()).
> It worked well in 7.1.3, but in 7.2.1 the newly inserted records are
> read only through the odbc (MS Access, pgAdmin 1.2.0).
> I analized the log files and I found that:
> on update or on delete the client sends string like this
> 'update .... set .... where ... and "idoppont" = '2002-04-26 14:05:17.44'::timestamp'
>
> but
>
> in plsql in same record
> the value of the field is 2002-04-26 14:05:17.440044+02
PostgreSQL's default timestamp is timestamp(6).
Access seems to handle timestamp up to timestamp(3)
though ODBC can handle up to timestamp(9).
Probably you have to use timestamp(n) (n<=3) instead
of default timestamp.
Hiroshi Inoue
http://w2422.nsk.ne.jp/~inoue/