From: Andreas Joseph Krogh <andreak@officenet.no>
To: pgsql-jdbc@postgresql.org
Subject: Add URL-property to PGXADataSource
Date: Tue, 4 Jan 2011 12:41:11 +0100 (CET)
Message-ID: <27700153.601.1294141271158.JavaMail.on@prod2> (raw)
<p>Hi all!</p>
<p>The PGXADataSource lacks the URL-property which makes it harder to switch between database-vendors using XA-datasources using a unified configuration like Spring where one can use property-replacement to switch URL, username etc. based on properties in a property-file.</p>
<p>Are there any plans to add a URL-property to the PGXADataSource?</p>
<p><br />
<span style="font-family: monospace; font-size: 10px;">--<br />
Andreas Joseph Krogh <andreak@officenet.no><br />
Senior Software Developer / CTO<br />
------------------------+---------------------------------------------+<br />
OfficeNet AS | The most difficult thing in the world is to |<br />
Rosenholmveien 25 | know how to do a thing and to watch |<br />
1414 Trollåsen | somebody else doing it wrong, without |<br />
NORWAY | comment. |<br />
| |<br />
Tlf: +47 24 15 38 90 | |<br />
Fax: +47 24 15 38 91 | |<br />
Mobile: +47 909 56 963 | |<br />
------------------------+---------------------------------------------+</span></p>
From pgsql-jdbc-owner@postgresql.org Thu Jan 6 04:59:25 2011
Received: from maia.hub.org (maia-2.hub.org [200.46.204.251])
by mail.postgresql.org (Postfix) with ESMTP id 5A26A1337B9C
for <pgsql-jdbc-postgresql.org@mail.postgresql.org>; Thu, 6 Jan 2011 04:59:25 -0400 (AST)
Received: from mail.postgresql.org ([200.46.204.86])
by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024)
with ESMTP id 34584-05 for <pgsql-jdbc-postgresql.org@mail.postgresql.org>;
Thu, 6 Jan 2011 08:59:16 +0000 (UTC)
X-Greylist: delayed 00:06:37.032732 by SQLgrey-1.7.6
Received: from web110406.mail.gq1.yahoo.com (web110406.mail.gq1.yahoo.com [67.195.8.230])
by mail.postgresql.org (Postfix) with SMTP id BFE6C1337B96
for <pgsql-jdbc@postgresql.org>; Thu, 6 Jan 2011 04:59:15 -0400 (AST)
Received: (qmail 95548 invoked by uid 60001); 6 Jan 2011 08:52:35 -0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1294303955; bh=6ZHMAOzq31Ej16riPKLTkjwRRNENDH4E1Xo30gn8iQE=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=DPjmFA92FuGE/X/g09fsoCXfq2Jwbrdnli+AqVt31h0UMlWiyzumHbfHlU4vnJ1m8uOG93X+E0BQJQCh+C8TLuA34oEht3YjgSvaHuJROO17EDvO6kbIJ0dpvpq0oaDBSGR9bWwe81hTFhGokxC0MD9eFUHlfIDV/pGa8cUNcUQ=
DomainKey-Signature:a=rsa-sha1; q=dns; c=nofws;
s=s1024; d=yahoo.com;
h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type;
b=Qfnpz076iYcuk4CyQaHoqBHdSLzxFr9Nc+aBY1Aj5uqbXV1OntkzSpJqk8NdsxowL+X4itZWOF7OnNOptfHz3InEXdXAh8Ga/xE9ISAYCi6fEZg8D7yhkjM8ZpHm1qxDcq1D3HIws3x9mDzIObc8dyqUuIrpspkAPIaqtBaP51I=;
Message-ID: <416690.93407.qm@web110406.mail.gq1.yahoo.com>
X-YMail-OSG: qaEbz5AVM1k027F6nJFIAhgnXthqvizh34R7p5GrdTVcbFH
EbUTHWgqbdAzhJTGDn98aMFYSLpYpxTzY1nDel00DnFRqCohYmXHerXAQPc_
zj.p_1.vdf6VtW79DaRr0JmbxfVPGTz8n6RuFxVlrLUn..7sKZ84uKhlPjYm
FLnykJnGEGAP7_RHRwkfJf_v23CUwKNpa2J8FrsP.MdPAcqxI3vng0DIZbEO
mu.Qb27Dypc5_cFwF0lPDSkViPiA6hsj5avP12QGG5KR9AwHkeKUisEP52dA
xWUgPyJWYH0vmeL95LgWwDbVBTOrXzmyWxCdg_DzttSaKaxnxK4Mkx1paucv
NmH0V4HSIfbXItfLv6ZuiHZirM6ROEEL7oBLhCIc6mWTOT9.7Ch1KVRJhXh1
Jm9bxFNVKc88-
Received: from [119.152.52.105] by web110406.mail.gq1.yahoo.com via HTTP; Thu, 06 Jan 2011 00:52:34 PST
X-Mailer: YahooMailRC/553 YahooMailWebService/0.8.107.285259
Date: Thu, 6 Jan 2011 00:52:34 -0800 (PST)
From: Altaf Malik <mmalik_altaf@yahoo.com>
Subject: Strange behaviour of rs.getTimestamp
To: pgsql-jdbc@postgresql.org
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="0-532654577-1294303954=:93407"
X-Virus-Scanned: Maia Mailguard 1.0.1
X-Spam-Status: No, hits=-1.897 tagged_above=-10 required=5
tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001,
RCVD_IN_DNSWL_NONE=-0.0001, RFC_ABUSE_POST=0.001, T_RP_MATCHES_RCVD=-0.01,
T_TO_NO_BRKTS_FREEMAIL=0.01
X-Spam-Level:
X-Archive-Number: 201101/9
X-Sequence-Number: 21341
--0-532654577-1294303954=:93407
Content-Type: text/plain; charset=us-ascii
Hello everyone,
I am getting a strange behaviour from rs.getTimestamp() with two specific
dates. Please consider the following test case.
Statement stmt = con.createStatement();
stmt.executeUpdate("create table ts_test(a timestamp)");
stmt.executeUpdate("insert into ts_test values('15-APR-09');");
ResultSet rs = stmt.executeQuery("select * from ts_test");
while (rs.next()) {
Timestamp t = rs.getTimestamp(1);
System.out.println(rs.getString(1)+"->"+ t);
}
stmt.executeUpdate("drop table ts_test");
If you run this test case, I get : 2009-04-15 00:00:00->2009-04-15 01:00:00.0
Please note the values obtained from rs.getString and rs.getTimestamp are
different. I get correct values if I run the same test case against JDK 1.5
(However I have noticed the same behaviour on some of the JDK 1.5's on our
network)
This behaviour is for values 15 April 2009 and 1st June 2009. If I change the
year or date, it works just fine. It is not because of Daylight Savings settings
because on the very next day or the previous day, the value is correct. Is there
something needs to be fixed in Driver or it is the JDK causing the problem?
Regards,
Altaf Malik
--0-532654577-1294303954=:93407
Content-Type: text/html; charset=us-ascii
<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:10pt;color:#000000;">Hello everyone,<br> I am getting a strange behaviour from rs.getTimestamp() with two specific dates. Please consider the following test case.<br><br style="color: rgb(0, 0, 191);"><span style="color: rgb(0, 0, 191);"> Statement stmt = con.createStatement();</span><br style="color: rgb(0, 0, 191);"><span style="color: rgb(0, 0, 191);"> stmt.executeUpdate("create table ts_test(a timestamp)");</span><br style="color: rgb(0, 0, 191);"><span style="color: rgb(0, 0, 191);"> stmt.executeUpdate("insert into ts_test values('15-APR-09');");</span><br style="color: rgb(0, 0, 191);"><span style="color: rgb(0, 0, 191);"> ResultSet
rs = stmt.executeQuery("select * from ts_test");</span><br style="color: rgb(0, 0, 191);"><span style="color: rgb(0, 0, 191);"> while (rs.next()) {</span><br style="color: rgb(0, 0, 191);"><span style="color: rgb(0, 0, 191);"> Timestamp t = rs.getTimestamp(1);</span><br style="color: rgb(0, 0, 191);"><span style="color: rgb(0, 0, 191);"> System.out.println(rs.getString(1)+"->"+ t);</span><br style="color: rgb(0, 0, 191);"><span style="color: rgb(0, 0, 191);"> }</span><br style="color: rgb(0, 0, 191);"><span style="color: rgb(0, 0, 191);"> stmt.executeUpdate("drop table ts_test");</span><br><br>If you run this test case, I get : 2009-04-15 00:00:00->2009-04-15 01:00:00.0<br>Please note the
values obtained from rs.getString and rs.getTimestamp are different. I get correct values if I run the same test case against JDK 1.5 (However I have noticed the same behaviour on some of the JDK 1.5's on our network)<br><br>This behaviour is for values 15 April 2009 and 1st June 2009. If I change the year or date, it works just fine. It is not because of Daylight Savings settings because on the very next day or the previous day, the value is correct. Is there something needs to be fixed in Driver or it is the JDK causing the problem?<br><br>Regards,<br>Altaf Malik<br></div><br>
</body></html>
--0-532654577-1294303954=:93407--
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: andreak@officenet.no
Subject: Re: Add URL-property to PGXADataSource
In-Reply-To: <27700153.601.1294141271158.JavaMail.on@prod2>
References: <27700153.601.1294141271158.JavaMail.on@prod2>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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