This error occurs when installing the latest module on my postgresql setup of Drupal 4.7.2:
* warning: pg_query(): Query failed: ERROR: operator does not exist: integer && smallint HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts. in /{...omitted...}/html/drupal-4.7.2/includes/database.pgsql.inc on line 84.
* user warning: query: SELECT sid FROM workflow_states WHERE wid=0 && sysid=1 in smallints./{...omitted...}/html/drupal-4.7.2/includes/database.pgsql.inc on line 103.
This is found in workflow.module on line 459, in the _workflow_creation_state function, and references an int column and a smallint column in table {workflow_states}.
I see a couple of ways to address this: up-cast the smallint value to an int in the expression, or bring down the int to smallint (or tinyint for mysql). Is there a call to have drupal do that database-independently?
The other way might be to just make those columns be regular integers.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | workflow.module.removed_double_ampersand.patch | 414 bytes | PMunn |
Comments
Comment #1
PMunn commentedA closer look shows this to be mysql-specific code, so I've turned it into the ANSI standard term: the big, bad AND keyword. Ooh ahh, so impressive. Here's the patch that does it on the 7/19 CVS version.
Comment #2
jvandyk commentedCommitted. Thanks.
Comment #3
(not verified) commented