On 2/20/17 3:30 AM, Joel Jacobson wrote:
Also, I think the --lowercase-uniqueness feature would be useful by itself even without the --case-preserving feature, since that might be a good way to enforce a good design of new databases, as a mix of "users" and "Users" is probably considered ugly by many system designers.
FWIW, I don't think --lowercase-uniqueness is a good name. --case-insensitive-unique would be better.
In addition to that, it'd be interesting to allow for a user-supplied name validation function that can throw an error if it sees something it doesn't like (such as a name that contains spaces, or one that's longer than NAMEDATALEN). I suspect it'd be pretty hard to add that though.
BTW, keep in mind that what you're suggesting here means changing *every* catalog that contains a name field. A query against info_schema will show you that that's most of them.
-- Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX Experts in Analytics, Data Architecture and PostgreSQL Data in Trouble? Get it in Treble! http://BlueTreble.com 855-TREBLE2 (855-873-2532) -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers