pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedAutomated setting of timezone with connection pooling
3+ messages / 3 participants
[nested] [flat]
* Automated setting of timezone with connection pooling
@ 2006-04-24 17:25 George Woodring <george.woodring@iglass.net>
2006-04-24 20:55 ` Re: Automated setting of timezone with connection pooling Kris Jurka <books@ejurka.com>
2006-04-26 08:30 ` Re: Automated setting of timezone with connection pooling Markus Schaber <schabi@logix-tt.com>
0 siblings, 2 replies; 3+ messages in thread
From: George Woodring @ 2006-04-24 17:25 UTC (permalink / raw)
To: pgsql-jdbc
We have multiple databases in a cluster ( one for each of our customers
) which the default time zone needs to be different. We are currently
using dbcp to do our connection pooling. Can anyone recommend a good
way of automatically setting the timezone when the connection is made?
Thanks,
Woody
----------------------------------------
iGLASS Networks
211-A S. Salem St
Apex NC 27502
(919) 387-3550 x813
www.iglass.net
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Automated setting of timezone with connection pooling
2006-04-24 17:25 Automated setting of timezone with connection pooling George Woodring <george.woodring@iglass.net>
@ 2006-04-24 20:55 ` Kris Jurka <books@ejurka.com>
1 sibling, 0 replies; 3+ messages in thread
From: Kris Jurka @ 2006-04-24 20:55 UTC (permalink / raw)
To: George Woodring <george.woodring@iglass.net>; +Cc: pgsql-jdbc
On Mon, 24 Apr 2006, George Woodring wrote:
> We have multiple databases in a cluster ( one for each of our customers
> ) which the default time zone needs to be different. We are currently
> using dbcp to do our connection pooling. Can anyone recommend a good
> way of automatically setting the timezone when the connection is made?
>
I'm uncertain of what your requirements are. Do you just need a different
default timezone per database? If so, ALTER DATABASE mydb SET timezone =
'America/Los_Angeles'; You can also set the timezone in the same
fashion per database user. If you have other requirements,
you'll need to make them clear, but you're probably out of luck.
Kris Jurka
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Automated setting of timezone with connection pooling
2006-04-24 17:25 Automated setting of timezone with connection pooling George Woodring <george.woodring@iglass.net>
@ 2006-04-26 08:30 ` Markus Schaber <schabi@logix-tt.com>
1 sibling, 0 replies; 3+ messages in thread
From: Markus Schaber @ 2006-04-26 08:30 UTC (permalink / raw)
To: George Woodring <george.woodring@iglass.net>; +Cc: pgsql-jdbc
Hi, Woody,
George Woodring wrote:
> We have multiple databases in a cluster ( one for each of our customers
> ) which the default time zone needs to be different. We are currently
> using dbcp to do our connection pooling. Can anyone recommend a good
> way of automatically setting the timezone when the connection is made?
Chris already pointed out how to set the time zones per database and per
user.
Some connection poolings also include the possibility to specify
commands which are executed after connecting and before reusing a
connection. For JBoss foo-ds.xml, the syntax would be like:
<datasources>
<no-tx-datasource>
<jndi-name>...</jndi-name>
<connection-url>...</connection-url>
<!-- other settings ... -->
<new-connection-sql>SET timezone TO 5</new-connection-sql>
<check-valid-connection-sql>SET timezone TO
5</check-valid-connection-sql>
</no-tx-datasource>
</datasources>
HTH,
Markus
--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf. | Software Development GIS
Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2006-04-26 08:30 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-04-24 17:25 Automated setting of timezone with connection pooling George Woodring <george.woodring@iglass.net>
2006-04-24 20:55 ` Kris Jurka <books@ejurka.com>
2006-04-26 08:30 ` Markus Schaber <schabi@logix-tt.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