Skip site navigation (1) Skip section navigation (2)

Re: Assign the system timezone to a variable in a function?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: Steve Murphy <smurphy(at)intorrent(dot)com>, pgsql-novice(at)postgresql(dot)org
Subject: Re: Assign the system timezone to a variable in a function?
Date: 2011-05-24 13:49:20
Message-ID: 5276.1306244960@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-novice
Merlin Moncure <mmoncure(at)gmail(dot)com> writes:
> On Tue, May 24, 2011 at 8:09 AM, Steve Murphy <smurphy(at)intorrent(dot)com> wrote:
>> Take the result of "show timezone", and assign it to a variable
>> in a function.

> I was about to suggest querying the pg_settings table, then noticed
> there was no 'timezone' record in it, which is pretty odd imo.  You
> can look at the log_timezone record however, which might be correct.

It's spelled "TimeZone" for historical reasons.  See also the
current_setting() function.

			regards, tom lane

In response to

Responses

pgsql-novice by date

Next:From: Merlin MoncureDate: 2011-05-24 13:59:41
Subject: Re: Assign the system timezone to a variable in a function?
Previous:From: Merlin MoncureDate: 2011-05-24 13:43:23
Subject: Re: Assign the system timezone to a variable in a function?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group