Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi there,
You use REGEX to check against a regular expression which is available in PostgreSQL, but not with that syntax. If I'm correct, they use the ~ operator. I just never use it since it's not compatible.
You can replace them all with a LIKE since all are '^something' and this equivalent to 'something%' with the LIKE keyword (which is common to all the database systems.)
Also, the $and variable in private_upload_views_handler_all_files() is used so needs to be defined no matter what (to avoid E_NOTICEs...) I included that small fix too.
Thank you.
Alexis Wilke
Comment | File | Size | Author |
---|---|---|---|
#5 | private_upload-6.x-1.0-rc3-Postgresql_1268334-adapted.patch | 3.92 KB | rmcom |
private_upload-6.x-Postgresql.patch | 3.92 KB | AlexisWilke |
Comments
Comment #1
rmcom CreditAttribution: rmcom commentedI am also running postgresql and would be very grateful if somebody could look at this patch.
I have applied this patch and the patch provided here http://drupal.org/node/280742 but both patches do not fit onto the current dev version and other versions I have tried.
It seems like this issue was already fixed here http://drupal.org/node/280742 but as the code evolved, it seems the dev version needs fixing to be compatible with postgresql again.
The following link from the thread at http://drupal.org/node/280742 may be useful: http://www.postgresql.org/docs/8.3/static/functions-matching.html
Comment #2
rmcom CreditAttribution: rmcom commentedAfter some googling I also found these two patches (at the end of the original post) that may help:
http://drupal.org/node/974872
Comment #3
rmcom CreditAttribution: rmcom commentedPostgreSQL compatibility would be essential for the success of this module.
Could it be integrated into the next RC?
Comment #4
rmcom CreditAttribution: rmcom commentedComment #5
rmcom CreditAttribution: rmcom commentedThe patch was not working (neither for for the current 6.x dev code nor for 6.x-1.0-rc3) because the line numbers did not match.
Otherwise the patch from above works. I have fixed the line numbers and am uploading the patch that makes 6.x-1.0-rc3 compatible with Postgresql.
Please
- refrain from using the command REXEP in the future and use LIKE because it works for MySQL and Postgresql (see patch code, above comment by AlexisWilke, and http://drupal.org/node/280742 for details)
Please
- roll this patch into the 6.x code to create rc4
Hope this helps all who had the same problem. And thank you to AlexisWilke for providing the original patch.
Comment #6
rmcom CreditAttribution: rmcom commented