好久没有看到一场这么爽的国家队比赛了

——今晚看了U20国家队跟乌克兰的比赛,实在是爽。上场对土耳其进了两个相对比较
“牛屎”的球,但是这场比赛我们的队员的表现真是可圈可点。开场一直给压着打,继
而失球,之后是一个漂亮的凌空射门扳平。下半场更是跌宕起伏,先是乌克兰禁区手球
送我们一个点球,然后我们在自己的禁区犯规回赠了一个,而且跟裁判理论过程当中,
还罚下了一名前锋。在10个打11个的情况下,利用一个定位球反超3:2并且保持到了
比赛结束。今天表现出来的拼劲和冲劲,确实是一改之前国家队的陋习。当然比赛经验
和常识还是缺乏啊,连评论员事先都知道未经裁判许可受伤球员不能立即投入比赛,这
样吃了一张黄牌;根据新例,犯规后犯规方不得接触皮球又吃了一张;然后给判罚了点
球又学国内联赛的陋习围堵裁判理论,连红牌都吃了。在场上踢球的这帮小伙子还是缺
了点脑袋。

——秉承一向以来的传统,中国男足在少年和青年队参加国际比赛基本上都没有什么丢
脸,而且近年来还相当不俗。可惜就是回来国内联赛的大染缸里面一泡,一个个都变成
方仲永了。但愿这拨新人日后能够出淤泥而不染吧,虽然机会有点渺茫……

点滴

——昨天晚上拉到今天早上,回到公司继续干活,因为这种肠胃问题在这种鬼天气下出
现已经是习以为常了。一打听,原来昨晚上Oracle的两个Support跟我们的同事一起都
做到了12点多,而且还病了一个,我们的PM晚上也跑去打点滴去了。一个这么重要的
项目就是靠一帮可敬的同事这样拼死拼活的撑着前进。

——晚上给项目组的同事介绍我们在产品组之前项目开发过程中用到的代码质量管理的
相关工具,幸而也引起了项目组同事的兴趣和共识。起码之前Falcon累死累活也是积累
了其中之一的经验,可以提供给其他同事共同进步,利己利人,好歹还是有一点点成就
感吧。

今天美其名曰培训的加班

——今天又加班,明天也是,就这样又没有了一个周末。名曰培训,实际就是装机,继
续着当年在深圳那边的痛苦经历,闷绝地在一旁看和做,然后就是掉入出错-重装的轮
回。时间就是这样子消耗掉。原定是17:00可以走人,但是现在估计是无期了。原定今
晚和爸爸妈妈一起订了新兴的桌子吃端午节的饭,现在恐怕只能让老婆一个人陪他们两
老了。

——整个项目组的人都做的很累,其他同事昨天晚上还搞到很晚,有的还做到凌晨3点
了。大家仿佛都是凭着对公司的责任感在不懈的拼命,但是人始终不是机器的,这种状
态能够撑多久呢?从去年就一直持续的这样子忙,如果总是以这种工作状态下去的话,
在这样的公司工作也是无趣的。

Oracle JDBC驱动中对Date支持的改动

——一直我们在Oracle8i上面用的程序,昨天发现放到9i数据库上面,用9i的JDBC驱动
连接后,发现我们用Java的Date类型放入到数据库DATE类型字段的数据,没有了时分
秒的信息。但是在8i上面用8i的JDBC驱动是没有问题的。换了一个我们自己Patch过的
8iJDBC驱动连9i数据库,DATE型的数据又可以保存时间信息了。结论就是9i的驱动是
不能将Java的Date里面的时间信息放入到DATE里面。

——翻查了Oracle的FAQ,果然发现这个结论和相应的解决办法:

Prior to 9.2, the Oracle JDBC drivers mapped the DATE SQL type to java.sql.Timestamp. This made a certain amount of sense because the Oracle DATE SQL type contains both date and time information as does java.sql.Timestamp. The more obvious mapping to java.sql.Date was somewhat problematic as java.sql.Date does not include time information. It was also the case that the RDBMS did not support the TIMESTAMP SQL type, so there was no problem with mapping DATE to Timestamp.

In 9.2 TIMESTAMP support was added to the RDBMS. The difference between DATE and TIMESTAMP is that TIMESTAMP includes nanoseconds and DATE does not. So, beginning in 9.2, DATE is mapped to Date and TIMESTAMP is mapped to Timestamp. Unfortunately if you were relying on DATE values to contain time information, there is a problem.

There are several ways to address this problem:

Alter your tables to use TIMESTAMP instead of DATE. This is probably rarely possible, but it is the best solution when it is.

Alter your application to use defineColumnType to define the columns as TIMESTAMP rather than DATE. There are problems with this because you really don’t want to use defineColumnType unless you have to (see What is defineColumnType and when should I use it?).

Alter you application to use getTimestamp rather than getObject. This is a good solution when possible, however many applications contain generic code that relies on getObject, so it isn’t always possible.

Set the V8Compatibility connection property. This tells the JDBC drivers to use the old mapping rather than the new one. You can set this flag either as a connection property or a system property. You set the connection property by adding it to the java.util.Properties object passed to DriverManager.getConnection or to OracleDataSource.setConnectionProperties. You set the system property by including a -D option in your java command line.

java -Doracle.jdbc.V8Compatibility=”true” MyApp