Forum OpenACS Development: Re: acs-object-management issues

Collapse
Posted by Dave Bauer on
It seems like you could just remove all non A-Z_ characters from the name and replace them with _ to be totally safe and catch any other potential problems.
Collapse
Posted by Jeff Davis on
I committed a change to map : to _ so it does not bomb. As for making it a valid db name -- yeah that seems reasonable too.

Here is what the PG manual says about identifiers:

SQL identifiers and key words must begin with a letter (a-z, but also letters with diacritical marks and non-Latin letters) or an underscore (_). Subsequent characters in an identifier or key word can be letters, underscores, digits (0-9), or dollar signs ($). Note that dollar signs are not allowed in identifiers according to the letter of the SQL standard, so their use might render applications less portable. The SQL standard will not define a key word that contains digits or starts or ends with an underscore, so identifiers of this form are safe against possible conflict with future extensions of the standard.