Posted by neilnz on April 1, 2009 at 9:33pm
6 followers
| Project: | Email Registration |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | reviewed & tested by the community |
Issue Summary
Hi,
I wanted to use this module on Postgres, but your SQL query to fetch the next sequence number is MySQL-specific.
Patch attached for Postgres support.
Thanks
| Attachment | Size |
|---|---|
| email_registration.module.patch | 1.36 KB |
Comments
#1
I don't have a test bed for this, but here's a better status ;)
#2
This is not a real solution to the problem because it uses a switch. We should use standard sql.
As far as I can tell, this code is trying to find 1) if the name is unique, 2) if not, what is the highest "index" for the name. While it may be slightly slower, we should be able to do more of this in php and make it cross-database compatible.
#3
Is there a solution to this. I'm running Drupal 6.19 and Email Registration 6.x-1.3 on PostgreSQL. I'm getting the errors below when registering a username of an email address that already exists in the db--as in the scenario outlined in this issue. The patch above failed. So, then, I tried to manually make the changes, but the code seems to be always using the mysql version of the query. I'm kind of stuck. Any advice on resolving this for pgsql would be much appreciated.
#4
***UPDATE***
I lied in my post above. The patch does work for me (user error before). It will suffice as a workaround for now. Thank you!
#5
Subscribing. An ANSI sql solution would be nice. BTW, thanks for a great module - we use it on hci.org - 200,000 member site.
#6
Here's a patch for review. Should be cross-db compatible, eliminating the need for db-specific solutions.
#7
#8
Tested, working fine!
#9
fyi - #657472: Add setting to allow users to login with email address or username depends on this patch
#10
@yaz085: to clarify your comment: the #657472-23: Add setting to allow users to login with email address or username patch includes this patch (it's not a dependency) ;) Maybe someone could work to split them (and then commit both) :)