Skip site navigation (1) Skip section navigation (2)

Re: Patch for JDBC timestamp problems

From: Michael Stephenson <mstephenson(at)tirin(dot)openworld(dot)co(dot)uk>
To: <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: Patch for JDBC timestamp problems
Date: 2001-01-16 09:43:02
Message-ID: Pine.LNX.4.30.0101160928380.3131-100000@tirin.openworld.co.uk (view raw or flat)
Thread:
Lists: pgsql-interfacespgsql-jdbcpgsql-patches
> Using static SimpleDateFormats will probably not cause threading
> issues.  Common sense says that if the set methods are never called on
> them there will be no state change that my cause sync problems.  But the
> spec doesn't garuntee it.  Personally I would have no problem using
> static SimpleDateFormats if this were my code.

Unfortunately common sense is of no use in this case, at least as far as
ths Sun JDK 1.2.2 goes..

For parse() and format() it uses a Calendar object (originally defined in
DateFormat) for working on. Look at the code, it's truly frightening that
somebody would choose to write it this way.

Until yesterday I would have used static SimpleDateFormat objects in my
code too.. :o(

Michael Stephenson      mstephenson(at)openworld(dot)co(dot)uk
Developer   -    Web Applications    -   Open World
Tel: +44 1225 444 950         Fax: +44 1225 336 738


In response to

pgsql-patches by date

Next:From: William WebberDate: 2001-01-17 00:36:58
Subject: Patch for jdbc Makefile
Previous:From: Peter EisentrautDate: 2001-01-15 21:03:38
Subject: Re: [PATCHES] docs: syntax.sgml patch

pgsql-interfaces by date

Next:From: Adam LangDate: 2001-01-16 13:41:30
Subject: Re: ODBC with VISUAL BASIC applications to access POSTGRESQL db on LINUX??
Previous:From: Peter T MountDate: 2001-01-16 09:12:46
Subject: Re: Deleting a list of external xinv/xinx files using JDBC

pgsql-jdbc by date

Next:From: William WebberDate: 2001-01-17 00:36:58
Subject: Patch for jdbc Makefile
Previous:From: Stu CoatesDate: 2001-01-15 22:20:11
Subject: JDBC buggy in 7.1beta3

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group