ROLE VALID UNTIL timezone?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

ROLE VALID UNTIL timezone?

Ron-2
Hi,

In 9.6, does it default to UTC, the postgresql.conf timezone value
(US/Eastern) value or to local system time?


--
Angular momentum makes the world go 'round.


Reply | Threaded
Open this post in threaded view
|

Re: ROLE VALID UNTIL timezone?

Adrian Klaver-4
On 11/27/19 2:19 PM, Ron wrote:
> Hi,
>
> In 9.6, does it default to UTC, the postgresql.conf timezone value
> (US/Eastern) value or to local system time?
>
>

test_(postgres)# show timezone;
   TimeZone
------------
  US/Pacific

test_(postgres)# create role ts_test valid until '12/31/2020';
CREATE ROLE

ts_test        | Cannot login
   +| {}
                 | Password valid until 2020-12-31 00:00:00-08
      |

Best guess it operates like if specifying a value for a timestamptz field.

--
Adrian Klaver
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: ROLE VALID UNTIL timezone?

Adrian Klaver-4
On 11/27/19 2:25 PM, Adrian Klaver wrote:

> On 11/27/19 2:19 PM, Ron wrote:
>> Hi,
>>
>> In 9.6, does it default to UTC, the postgresql.conf timezone value
>> (US/Eastern) value or to local system time?
>>
>>
>
> test_(postgres)# show timezone;
>    TimeZone
> ------------
>   US/Pacific
>
> test_(postgres)# create role ts_test valid until '12/31/2020';
> CREATE ROLE
>
> ts_test        | Cannot login   +| {}
>                  | Password valid until 2020-12-31 00:00:00-08      |
>
> Best guess it operates like if specifying a value for a timestamptz field.

Decided to see if guess was correct:

https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/backend/commands/user.c;h=aab5aa855d2851222dc7738c7575ad805f6bce94;hb=HEAD

Line 94

Datum       validUntil_datum;   /* same, as timestamptz Datum */


--
Adrian Klaver
[hidden email]