Re: [PATCHES] Patch for units in postgresql.conf

2006-07-26 Thread Zdenek Kotala
Peter Eisentraut wrote: Here is a preliminary patch for units in postgresql.conf (and SET and so on, of course). It currently supports memory units only. Time units would be similar. Let me know if you have comments. The concept is good. However, parse should generate overflow. You multipl

Re: [PATCHES] Patch for units in postgresql.conf

2006-07-25 Thread Alvaro Herrera
Peter Eisentraut wrote: > + if ((flags & (GUC_UNIT_KB|GUC_UNIT_BLOCKS)) && endptr != value) > + { > + bool used = false; > + > + while (*endptr == ' ') > + endptr++; > + > + if (strcmp(endptr, "kB") == 0) > + { > +

Re: [PATCHES] Patch for units in postgresql.conf

2006-07-25 Thread Peter Eisentraut
Am Dienstag, 25. Juli 2006 15:12 schrieb Alvaro Herrera: > Does this mean that one must match the "kB" exactly, with the specified > upper and lower case? I think it's better to require exact spelling of the units, or else it'll quickly get inconsistent and error-prone. (Say, if you want to allo

[PATCHES] Patch for units in postgresql.conf

2006-07-25 Thread Peter Eisentraut
Here is a preliminary patch for units in postgresql.conf (and SET and so on, of course). It currently supports memory units only. Time units would be similar. Let me know if you have comments. (FWIW, work_mem is a good parameter to play with for trying this out.) -- Peter Eisentraut http://