Re: slightly misleading Error message in guc.c - Mailing list pgsql-hackers

From Nazir Bilal Yavuz
Subject Re: slightly misleading Error message in guc.c
Date
Msg-id CAN55FZ1=aNRLAy=AwTTC-cV_PJZfUQr745aewRiAryKQJZ22aw@mail.gmail.com
Whole thread Raw
In response to slightly misleading Error message in guc.c  (jian he <jian.universality@gmail.com>)
List pgsql-hackers
Hi,

On Mon, 22 Apr 2024 at 11:44, jian he <jian.universality@gmail.com> wrote:
>
> hi.
> minor issue in guc.c.
>
> set work_mem to '1kB';
> ERROR:  1 kB is outside the valid range for parameter "work_mem" (64
> .. 2147483647)
> should it be
> ERROR:  1 kB is outside the valid range for parameter "work_mem" (64
> kB .. 2147483647 kB)
> ?
> since the units for work_mem are { "B", "kB", "MB", "GB", and "TB"}
>
> search `outside the valid range for parameter`,
> there are two occurrences in guc.c.

Nice find. I agree it could cause confusion.

-- 
Regards,
Nazir Bilal Yavuz
Microsoft



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: pg_combinebackup does not detect missing files
Next
From: Robert Haas
Date:
Subject: Re: allow changing autovacuum_max_workers without restarting