pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
ROLE VALID UNTIL timezone?
3+ messages / 2 participants
[nested] [flat]

* ROLE VALID UNTIL timezone?
@ 2019-11-27 22:19  Ron <ronljohnsonjr@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Ron @ 2019-11-27 22:19 UTC (permalink / raw)
  To: pgsql-general

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.





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: ROLE VALID UNTIL timezone?
@ 2019-11-27 22:25  Adrian Klaver <adrian.klaver@aklaver.com>
  parent: Ron <ronljohnsonjr@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Adrian Klaver @ 2019-11-27 22:25 UTC (permalink / raw)
  To: Ron <ronljohnsonjr@gmail.com>; pgsql-general

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
adrian.klaver@aklaver.com





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: ROLE VALID UNTIL timezone?
@ 2019-11-28 03:25  Adrian Klaver <adrian.klaver@aklaver.com>
  parent: Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Adrian Klaver @ 2019-11-28 03:25 UTC (permalink / raw)
  To: Ron <ronljohnsonjr@gmail.com>; pgsql-general

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=aab5aa855...

Line 94

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


-- 
Adrian Klaver
adrian.klaver@aklaver.com





^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2019-11-28 03:25 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-11-27 22:19 ROLE VALID UNTIL timezone? Ron <ronljohnsonjr@gmail.com>
2019-11-27 22:25 ` Adrian Klaver <adrian.klaver@aklaver.com>
2019-11-28 03:25   ` Adrian Klaver <adrian.klaver@aklaver.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