Download & Extend

PostgreSQL fails table creation

Project:Mail API
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:patch (to be ported)

Issue Summary

Hi there,

The installation fails because you have a couple of int default '0' with quotes around the zero. That is not acceptable to PostgreSQL (it's an integer, not a string.)

Thank you.
Alexis Wilke

AttachmentSize
mail_api-6.x-1.0-invalid-default-integer.patch912 bytes

Comments

#1

Status:active» patch (to be ported)

I actually included a patch so I'm fixing the status.

#2

This is another patch to fix the other problem: You named a field in your database 'default' which is a reserved keyword in most database systems. You just cannot do that!

It looks like at this time you are not accessing that field so I simply commented it out. Otherwise, you need to rename it something like 'default_value' or use a name that represents what that default is...

Thank you.
Alexis Wilke

P.S. You will need to apply my first patch to be able to apply this patch automatically. But I suspect you won't want to just apply this patch...

AttachmentSize
mail_api-6.x-1.0-invalid-field-name.patch 629 bytes

#3

Version:6.x-1.0»

First, I tried to install the recommended final mail_api, v6.x-1.7, but it failed with this many PostgreSQL error messages.

I had the same problem with the latest mail_api, v1.6.2.3 (2009/10/02 20:47:14).

But commenting out the line as seen in the patch by AlexisWilke finally solved this problem.

mail_api.install:
//'default' => array('type' => 'int', 'not null' => TRUE, 'default' => '0'),

Please apply the patch in all future versions for PostgreSQL users.