Re: ALTER USER

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Rod Taylor <rbt(at)rbt(dot)ca>, Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER USER
Date: 2003-03-19 21:38:52
Message-ID: 200303192138.h2JLcqS15846@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


I am a little disturbed by having NULL mean no expire of password, but
documenting that 'infinity' is the proper way to set no expiration.

Does that disturb anyone else? Should we hack up the grammar to allow
VALID UNTIL NULL for consistency?

I guess I imagine someone spinning through pg_shadow and looking for
infinity and not looking at NULL as equivalent. Maybe I should document
NULL is valid too for 'infinity'.

I will apply Alvero's documentation patch with a mention that internally
NULL is also infinity.

Comments?

---------------------------------------------------------------------------

Tom Lane wrote:
> Rod Taylor <rbt(at)rbt(dot)ca> writes:
> > It may be worth while to change the default for valuntil to be
> > 'infinity'. NULL implies they will expire, we're just not sure when.
>
> This is not the only place in the system catalogs where NULL is
> effectively used to mean a default value that could also be spelled
> out explicitly. (ACLs behave that way, and useconfig/datconfig
> do too IIRC.)
>
> It's a bit of a hack, but it saves table space and backend code ---
> without this convention the default would have to be inserted "manually"
> since we have no mechanism to supply defaults when C code is forming a
> new catalog tuple.
>
> I'm inclined to leave the code alone. But Alvaro is right that it'd be
> good to point out the 'infinity' option in the CREATE USER and ALTER
> USER man pages. (Doc patch please?)
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faqs/FAQ.html
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2003-03-19 21:38:59 Re: ALTER USER
Previous Message Bruce Momjian 2003-03-19 21:31:38 Re: [BUGS] Bug #904: Deallocating of prepared statement in ECPG at