send_setting can't install table in PostgreSQL - Syntax error

Josh Waihi - July 16, 2009 - 23:48
Project:Send
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:reviewed & tested by the community
Description

This is because the column 'nid' specifies a 'length' but lengths are for string based data types. You can' t specify a length for int columns but you can specify a 'size' with possible values of small, normal (default) or large.

- 'length' => 50,

see #346450: Schema API: 'length' should be ignored on non varchar and char fields

#1

stuzza - July 17, 2009 - 02:43

Have attached a mighty one line patch addressing this.

AttachmentSize
send-346450.patch 564 bytes

#2

Josh Waihi - July 17, 2009 - 02:45
Status:active» reviewed & tested by the community

Thanks @stuzza

#3

stuzza - July 17, 2009 - 02:55
Status:reviewed & tested by the community» active

A colleague suggested it useful to ask why 'length' => 50 was specified in the first place. In the node_revisions table nid is defined as a standard int (in node table, of course, it's a serial). I note that numerous fields in the send_schema() are 'varchar' of length 50 so I'm guessing this was a typo rather than an attempt to specify int size.

Thoughts?

Stuart

#4

Josh Waihi - July 17, 2009 - 23:57
Status:active» reviewed & tested by the community

patch fixes problem, length doesn't need to be specified and replicating the nid column in the node table will keep things consistent.

 
 

Drupal is a registered trademark of Dries Buytaert.