A problem with blocks.delta field datatype.

It is declared as varchar(32) (block.install line 23).

In simpletest/tests/block.test line 82, it is treated as an integer, which causes a warning in postgresql:

mich=> SELECT bid FROM blocks WHERE module = 'user' AND delta = 1;
ERROR:  operator does not exist: character varying = integer
LINE 1: SELECT bid FROM blocks WHERE module = 'user' AND delta = 1;
                                                               ^
HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.

A similar query on mysql runs without warning on my install.

I attach a simple patch, which makes block test succeed on postgres.

CommentFileSizeAuthor
block_delta_is_varchar.patch1.14 KBRockyRoad

Comments

boombatower’s picture

Title: [block.test] delta field type - pgsql fails » block.test should treat delta as string
Status: Needs review » Fixed

Left over from when deltas were changed.

Committed, thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.