pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedHow to solve invalid input for tyep timestamp problem?
4+ messages / 3 participants
[nested] [flat]
* How to solve invalid input for tyep timestamp problem?
@ 2005-11-02 10:57 Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>
2005-11-02 12:19 ` Re: How to solve invalid input for tyep timestamp problem? Dave Cramer <pg@fastcrypt.com>
0 siblings, 1 reply; 4+ messages in thread
From: Joost Kraaijeveld @ 2005-11-02 10:57 UTC (permalink / raw)
To: pgsql-jdbc
Hi,
I want log4j to log in a PostgreSQL database. Log34j uses "2005-11-02
11:49:57,844" as it's timestamp format. I used TIMESTAMP as a columntype
but apparenty that is not the correct type:
java.sql.SQLException: ERROR: invalid input syntax for type timestamp:
"2005-11-02 11:49:57,844"
What should be the type I should use for the column?
--
Groeten,
Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
e-mail: J.Kraaijeveld@Askesis.nl
web: www.askesis.nl
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: How to solve invalid input for tyep timestamp problem?
2005-11-02 10:57 How to solve invalid input for tyep timestamp problem? Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>
@ 2005-11-02 12:19 ` Dave Cramer <pg@fastcrypt.com>
2005-11-02 13:10 ` Re: How to solve invalid input for tyep timestamp problem? Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>
2005-11-05 09:33 ` Re: How to solve invalid input for tyep timestamp problem? Kris Jurka <books@ejurka.com>
0 siblings, 2 replies; 4+ messages in thread
From: Dave Cramer @ 2005-11-02 12:19 UTC (permalink / raw)
To: Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>; +Cc: pgsql-jdbc
What version of the driver are you using ?
Does log4j use prepared statements?
This is the right column, but the , between 57,844 is wrong, there
was a bug in the HEAD driver which would
have caused this if the answer to the first 2 questions is HEAD, and
yes.
If this doesn't solve your problem, then I suspect it is locale
related. The comma (,) is commonly used for the decimal
place in EU.
Dave
On 2-Nov-05, at 5:57 AM, Joost Kraaijeveld wrote:
> Hi,
>
> I want log4j to log in a PostgreSQL database. Log34j uses "2005-11-02
> 11:49:57,844" as it's timestamp format. I used TIMESTAMP as a
> columntype
> but apparenty that is not the correct type:
>
> java.sql.SQLException: ERROR: invalid input syntax for type timestamp:
> "2005-11-02 11:49:57,844"
>
> What should be the type I should use for the column?
>
>
> --
> Groeten,
>
> Joost Kraaijeveld
> Askesis B.V.
> Molukkenstraat 14
> 6524NB Nijmegen
> tel: 024-3888063 / 06-51855277
> fax: 024-3608416
> e-mail: J.Kraaijeveld@Askesis.nl
> web: www.askesis.nl
>
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that
> your
> message can get through to the mailing list cleanly
>
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: How to solve invalid input for tyep timestamp problem?
2005-11-02 10:57 How to solve invalid input for tyep timestamp problem? Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>
2005-11-02 12:19 ` Re: How to solve invalid input for tyep timestamp problem? Dave Cramer <pg@fastcrypt.com>
@ 2005-11-02 13:10 ` Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>
1 sibling, 0 replies; 4+ messages in thread
From: Joost Kraaijeveld @ 2005-11-02 13:10 UTC (permalink / raw)
To: Dave Cramer <pg@fastcrypt.com>; +Cc: pgsql-jdbc
Hi Dave,
On Wed, 2005-11-02 at 07:19 -0500, Dave Cramer wrote:
> What version of the driver are you using ?
postgresql-8.0-313.jdbc3.jar
> Does log4j use prepared statements?
No, it does not in the JBoss supplied version (JBoss 4.0.3 / Log4J
1.2.8)
> This is the right column, but the , between 57,844 is wrong, there
> was a bug in the HEAD driver which would
> have caused this if the answer to the first 2 questions is HEAD, and
> yes.
Ah, ",". I should either take glasses or reset my screen resolution.
After replacing the format specifiers: yes, that solves the problem.
Thanks, for answering.
--
Groeten,
Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
e-mail: J.Kraaijeveld@Askesis.nl
web: www.askesis.nl
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: How to solve invalid input for tyep timestamp problem?
2005-11-02 10:57 How to solve invalid input for tyep timestamp problem? Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>
2005-11-02 12:19 ` Re: How to solve invalid input for tyep timestamp problem? Dave Cramer <pg@fastcrypt.com>
@ 2005-11-05 09:33 ` Kris Jurka <books@ejurka.com>
1 sibling, 0 replies; 4+ messages in thread
From: Kris Jurka @ 2005-11-05 09:33 UTC (permalink / raw)
To: Dave Cramer <pg@fastcrypt.com>; +Cc: Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>; pgsql-jdbc
On Wed, 2 Nov 2005, Dave Cramer wrote:
> What version of the driver are you using ?
> Does log4j use prepared statements?
>
> This is the right column, but the , between 57,844 is wrong, there was a bug
> in the HEAD driver which would
> have caused this if the answer to the first 2 questions is HEAD, and yes.
>
Just for the record. The problem was in interval parsing, not timestamp,
and it is fixed now.
Kris Jurka
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2005-11-05 09:33 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-11-02 10:57 How to solve invalid input for tyep timestamp problem? Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>
2005-11-02 12:19 ` Dave Cramer <pg@fastcrypt.com>
2005-11-02 13:10 ` Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>
2005-11-05 09:33 ` Kris Jurka <books@ejurka.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox