From: | raghavendra t <raagavendra(dot)rao(at)gmail(dot)com> |
---|---|
To: | Steve Crawford <scrawford(at)pinpointresearch(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: How do we get the Client-Time and Server-Time from psql ? |
Date: | 2010-06-04 17:50:12 |
Message-ID: | AANLkTilYrWlr0fJgRz06_fqDM2FlkuILX5cNO5KLhoDQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Thank you Very Much Steve.
On Thu, Jun 3, 2010 at 6:10 AM, Steve Crawford <
scrawford(at)pinpointresearch(dot)com> wrote:
> On 06/02/2010 03:29 PM, raghavendra t wrote:
>
>> ...
>>
>> Suppose am at the server-end, how could i get the client-time. Its really
>> troublesome when compared with the timezone column in a table.
>>
>> Not sure what you are getting at. You are always connected to the server
> _through_ a client and you _tell_ the server your timezone preferences.
>
> As long as you are using timestamptz and as long as the client properly
> sets its preferred time-zone prior to issuing queries or gives
> fully-qualified timestamps with TZ, then you are fine.
>
> Alternately, you can use (for libpq clients) the PGTZ environment variable.
>
> Or you can set things on a per-user basis:
> alter user foo set timezone to 'SOMETZ';
>
> Or for things like web-apps where the client-side of the connection to the
> database is probably through a single database-user and the actual users are
> all over the place you can set up a table of user-preferences and set the
> timezone appropriately.
>
> Cheers,
> Steve
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Filip Rembiałkowski | 2010-06-04 19:37:03 | Re: Connection's limit in SCO OpenServer 5.0.7 and pg 8.3.11 (no more than 94 connections) |
Previous Message | Tom Lane | 2010-06-04 17:40:46 | Re: cannot assign non-composite value to a row variable |