Re: GUC time unit spelling a bit inconsistent

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Sullivan <ajs(at)crankycanuck(dot)ca>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: GUC time unit spelling a bit inconsistent
Date: 2007-06-21 15:55:56
Message-ID: 17248.1182441356@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Sullivan <ajs(at)crankycanuck(dot)ca> writes:
> Nevertheless, I think that Tom's original suggestion was at least a
> HINT, which seems perfectly reasonable to me.

That's the only idea in the whole thread that hasn't been objected to,
so let's just do that and have done with it. (Even if we were to agree
on loosening the accepted set of unit names, a HINT listing the accepted
names would still be needed.)

I gather Peter is travelling, so I'll take a cut at a patch. I'm
imagining that the output will look something like

ERROR: invalid value for parameter "autovacuum_naptime": "5sec"
HINT: Valid units for this parameter are "d", "h", "min", "s", "ms".

where the HINT gets appended if there's something after the integer but
it doesn't look like any of the allowed units. Objections?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Sullivan 2007-06-21 16:24:15 Re: GUC time unit spelling a bit inconsistent
Previous Message Andrew Sullivan 2007-06-21 15:34:42 Re: GUC time unit spelling a bit inconsistent