Database design : preferred field length for file paths
I have to store file paths in a DB field (`/tmp/aaa/bbb`, `C:\temp\xxx\yyy`, etc.). I can't really tell how long they could be.

Given this http://en.wikipedia.org/wiki/Comparison_of_file_systems and that http://msdn.microsoft.com/en-us/library/aa365247.aspx, depending on the file system there could be theoretically no length limit for a path.

I guess that defining this field as a `LONGBLOB` or `VARCHAR(very high value)` wouldn't be wise. I've thought about something like `VARCHAR(1024)` which should be suitable for most frequent (even if not all) cases, and not too big as a DB field. What would you recommend ?

Thanks.
Database design : preferred field length for file paths
===

I have to store file paths in a DB field (`/tmp/aaa/bbb`, `C:\temp\xxx\yyy`, etc.). I can't really tell how long they could be.

Given this http://en.wikipedia.org/wiki/Comparison_of_file_systems and that http://msdn.microsoft.com/en-us/library/aa365247.aspx, depending on the file system there could be theoretically no length limit for a path.

I guess that defining this field as a `LONGBLOB` or `VARCHAR(very high value)` wouldn't be wise. I've thought about something like `VARCHAR(1024)` which should be suitable for most frequent (even if not all) cases, and not too big as a DB field. What would you recommend ?

Thanks.