Re: time zone setting. - Mailing list pgsql-jdbc

From Maciek Sakrejda
Subject Re: time zone setting.
Date
Msg-id CAH_hXRZLOF=ZBGip1kY36ciRHBPDzcw4hZHMvEAEXEqPKyvCrA@mail.gmail.com
Whole thread Raw
In response to time zone setting.  (dexdyne <from_postgresql_forum@dexdyne.com>)
Responses Re: time zone setting.
List pgsql-jdbc
> in front of some other queries, and they will operate as I expect. In fact I
> find the change persist across multiple PgAdmin queries, so it is obviously
> a "session setting"

Right (you can use SET LOCAL for this-transaction-only changes).

> But I can't put the "set time zone" stretring on the front of a jdbc
> preparedStatement - it just barfs.

You can't just prepend it to the statement text because JDBC prepared
statements need to correspond to a single SQL statement. But you
should be able to issue a separate "set time zone" statement (either
normal or prepared) and get the session behavior you see through
pgAdmin.  Does that not work? What is the error?

---
Maciek Sakrejda | System Architect | Truviso

1065 E. Hillsdale Blvd., Suite 215
Foster City, CA 94404
(650) 242-3500 Main
www.truviso.com

pgsql-jdbc by date:

Previous
From: dexdyne
Date:
Subject: time zone setting.
Next
From: Oliver Jowett
Date:
Subject: Re: time zone setting.