|
Home > Archive > PostgreSQL JDBC > April 2005 > Re: Interval support for Postgres
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: Interval support for Postgres
|
|
| Kris Jurka 2005-04-21, 8:24 pm |
|
On Thu, 21 Apr 2005, Oliver Siegmar wrote:
> On Thursday 21 April 2005 20:32, Kris Jurka wrote:
>
> Can it be placed in the JDBC3 package, then? This requires JDK 1.4 anyway,
> right?
>
It could, but I'd be against it. Having a different PGInterval behavior
for JDBC2 and JDBC3 builds would be rather odd. While regex may be
convenient here it certainly isn't essential. If you want to get this in
I'd recommend rewriting to do the parsing manually.
Kris Jurka
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster
| |
| Oliver Siegmar 2005-04-21, 8:24 pm |
| On Thursday 21 April 2005 21:43, Kris Jurka wrote:
> On Thu, 21 Apr 2005, Oliver Siegmar wrote:
>
> It could, but I'd be against it. Having a different PGInterval behavior
> for JDBC2 and JDBC3 builds would be rather odd. While regex may be
> convenient here it certainly isn't essential. If you want to get this in
> I'd recommend rewriting to do the parsing manually.
Well, actually there is almost no implementation at all. Parsing strings in
Java in 2005 is a royal pain in the XXX - doing that for 0.x% users suck even
more.
Let's assume I'd write a JDBC2 version with old-school string parsing - would
you apply it to upstream, or are there any other show stoppers?
Oliver
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
| |
| Oliver Jowett 2005-04-21, 8:24 pm |
| Kris Jurka wrote:
> 1) You have an "int milliseconds" field. PG supports microsecond
> precision in intervals. Is there any reason not to go with a plain "float
> seconds" field instead of splitting these up?
Can you represent all of 0.000000 .. 59.999999 exactly as floats?
-O
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
|
|
|
|
|