|From:||Marko Kreen <markokr(at)gmail(dot)com>|
|Subject:||[PATCH] Cleanup of GUC units code|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
Current GUC units code has 2 problems:
- It requires case-sensiteive representation of units ("kB").
As the main point of units is to make configuring easier,
requiring byte-exact typing makes them unnecessarily fragile.
- In attempt to preserve maximum range of values for INT64_IS_BUSTED
systems, the code is written rather non-obvious way.
Attached patch replaces per-unit custom code with lookup table,
where each unit is represented as multiplier of base unit.
And it compares unit names case-insensitivaly.
It sacrifices some range on INT64_IS_BUSTED systems, but as the only promise
we offer them is that "Postgres may compile" I don't see it as problem.
In case people like the case-sensitivity, it can be restored and the patch
applied as plain cleanup.
|Next Message||Marko Kreen||2008-08-31 22:17:38||[PATCH] In case module has wrong magic, report exact problem|
|Previous Message||Marko Kreen||2008-08-31 22:17:27||[PATCH] Make gram.y use palloc/pfree for memory management|