Closed Bug 299880 Opened 16 years ago Closed 16 years ago
.pm fails with locate() function if using Postgre SQL
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050513 Fedora/1.0.4-1.3.1 Firefox/1.0.4 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050513 Fedora/1.0.4-1.3.1 Firefox/1.0.4 User.pm -> Line 1138 PostgreSQL does not have a locate() function. It uses strpos(). Reproducible: Always Steps to Reproduce: 1. Install for PostgreSQL 2. Try to add a new user 3. Actual Results: An error occurs about missing locate() function Expected Results: Completely untested but: my $sth = $dbh->prepare( "SELECT eventdata FROM tokens WHERE tokentype = 'emailold' AND SUBSTRING(eventdata, 1, (strpos(eventdata, ':') - 1)) = ? OR SUBSTRING(eventdata, (strpos(eventdata, ':') + 1)) = ?"); I also had to add a default of now() to the refreshed_when column in profiles as PostgreSQL enforces NOT NULL.
Yep. :-) And I've fixed it. :-) *** This bug has been marked as a duplicate of 292718 ***
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.