Open Bug 313601 Opened 19 years ago Updated 19 years ago

[PostgreSQL] keywords are case sensitive in PostgreSQL but not in MySQL

Categories

(Bugzilla :: Database, defect)

2.20
defect
Not set
normal

Tracking

()

People

(Reporter: emmanuel, Unassigned)

References

Details

Using the CVS head with a pg database, I'm able to create both the keywords 'foo' and 'Foo' which register as two different keywords in the edikeywords.cgi page.
Using MySQL, adding the second keyword throws me the error keyword_already_exists ("A keyword with the name already exists.").
I'm not sure what the correct behaviour is in this case (although I don't see why anybody would want case-sensitive keywords) but the behaviour should be consistent  across both databases.
For the record, note also bug 252004. I think keywords should be case insensitive.
Summary: [PostgreSQL] keywords are case sensitive in PostgreSQL but not in MySQL → [PostgreSQL] keywords are case sensitive in PostgreSQL but not in MySQL
Agreed, keywords should be case-insensitive. This can be handled somewhat crudely by creating a UNIQUE index on LOWER(value) on the keywords table, in PostgreSQL.
(In reply to comment #2)
> Agreed, keywords should be case-insensitive.

A moot point, right now. From globals.pl :

sub GetKeywordIdFromName {
    my ($name) = (@_);
    $name = lc($name);
    return $::keywordsbyname{$name};
}
Blocks: meta-pg
You need to log in before you can comment on or make changes to this bug.