I am using postgresql-9.1.2-2
If I access to my host with the arguments user/random-user-name gets an fatal error from the database:
PDOException: SQLSTATE[22P02]: Invalid text representation
The error is produced because Drupal tries to search in the database which uid is similar to random-user-name, and since this is not a number (as it should be) and postresql seems to not support conditions like " WHERE (base.uid IN ('random-user-name')) " because it expects a list of numbers and not any string.
This error is found before any menu access callback is called. It is executed figuring out which default theme must be used, and it is called in drupal_bootstrap phase.
Instead this ugly database error Drupal should return any 404 error, as with MySQL happens.
Comments
Comment #1
xjmSo
random-user-namemeansany-noninteger-string? Since the valid paths areuser/N.Let's have one more person confirm whether the following steps are sufficient to reproduce the issue:
http://example.com/user/foo.Thanks!
Comment #2
eldrupalista commentedDone, and it still crash.
Exactly, random-user-name is any string.
I have created a patch for this:
File: core/modules/user/user.module
Since user_load expects for an Integer it doesn't make sense continue searching if the $uid parameter is not an Integer. This not only fix the bug, it also saves time.
Comment #3
eldrupalista commentedComment #4
xjmStill postponed for more info per #1.
Comment #5
jhedstromWe now have automated tests for pgsql on 8.x, so this is almost certainly fixed there. Bumping to 7.x, but could probably be closed due to inactivity.