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.

Comments

PMunn’s picture

Status: Active » Needs review
StatusFileSize
new414 bytes

A 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.

jvandyk’s picture

Status: Needs review » Fixed

Committed. Thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)