Home » Logging » Log » Bug #2137
Identifier string for sql logs is too restrictive
Details
| Request #2137 | Identifier string for sql logs is too restrictive |
|---|---|
| Submitted | 2004-08-16 19:08 UTC |
| From | mjohnson at pitsco dot com |
| Assigned | jon |
| Status | Closed |
| Package | Log |
| PHP Version | Irrelevant |
| Roadmaps | (Not assigned) |
Comments
[2004-08-16 19:08 UTC] mjohnson at pitsco dot com
Description:
------------
The new restriction on identifiers being only 16 characters long in the SQL implementation is, IMHO, far too restrictive.
I would suggest that this new value be configurable. See the reproduce code for a patch.
Thanks,
Michael
Reproduce code:
---------------
http://mdjohnson.us/php/Log-sql.patch.txt
[2004-08-17 15:41 UTC] mjohnson at pitsco dot com
Thanks for your response.
I completely understand the reasoning. And I agree that in most circumstances 16 characters is probably enough. I was thinking I was using 20 or more but it turns out that 16 is valid for me, even though my table has 32 characters.
However, I'm a firm believer that any time you add some sort of restriction that it should be made configurable. Find a reasonable default, but allow the user to change it. This belief comes primarily from being burned too many times by not making something configurable.
As for making users aware of the issue, it should be included in the documentation for the configuration parameter, with wording something like
Warning. If you change this parameter from the
default (16), please make sure your database
schema supports the new value.
Or whatever works.
Thanks,
Michael