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
Have attached a mighty one line patch addressing this.
#2
Thanks @stuzza
#3
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
patch fixes problem, length doesn't need to be specified and replicating the nid column in the node table will keep things consistent.