Older Carbon or Classic (OS 9) apps won't let you type more than 31 characters. Note that OSX uses the suffix to determine what app opens the document. Also worth noting is that some characters are disallowed in file names, such as : and / which are used to specify directory paths.
I think this must be the issue that I'm running into with Photoshop.
Thanks to everyone who replied. The error message that I received when trying to save a .jpg file with a long name referred to a "Mac Limit" of characters ... but there's no way the file name was 255 characters in length ... 32, I'll believe.
Just as an example of one application, Office X is limited to the 32 characters, while Office 2004 finally took that limitation out. All depends on the application and how it was written.
Most parts of OS X are also limited when it comes to the overall length of the file path. The path limitation, "PATH_MAX", is 1,024 bytes, which in most cases means 1,024 characters. (That's based on 1 byte for each character, though Asian characters may require more bytes to represent them).
Under most circumstances, you won't ever run into this limit, but when you do, you'll get unexpected behavior in the Finder. For example, not being able to move files and folders out of the folder in question.
Most applications will allow you to use up to 255 characters in the filename, but certain Carbon software that uses the older FSSpecs (a way to refer to a file) will be limited to 31 characters.
slash or colon are disallowed, but not both (techincally; doesn't mean a programmer may have a reason to prohibit both or may do so without understanding that it isn't necessary). Slash is the unix delimiter, colon is the (legacy) Mac one. Mac interfaces automatically map the "legal character" and the "path delimiter" entities correctly. For example, one can create a folder in the Finder named "foo/bar" but not "foo:bar"; the result will be a directory named "foo:bar" for Unixy things.
Another thing that freaks some non-true-Unix apps out is having spaces in the path. Like leaving your startup volume at the default "Macintosh HD" or naming a folder "My Little Secret Folder". Hence it is usually safer to use dashes or underscores in file/folder names, especially if you're working with many different apps.
In my experience, it's the true-Unix apps (or Mac apps that spawn shell scripts under-the-hood) that are more likely to mishandle filenames with spaces. The Mac world has always had spaces in filenames and its programmer tools are well aware of that. Spaces are pretty rare in the unix world, though, so it's easy for unix folks to forget to quote them properly. Regardless, it's always a bit of a risk, and much more-so if you're passing files between different apps or different machines.