Postgres install error
curtis - May 2, 2009 - 07:32
| Project: | Activity Stream |
| Version: | 6.x-1.0-rc1 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | fixed |
Description
I got the following errors when trying to install the Activity Stream core module:
* warning: pg_query() [function.pg-query]: Query failed: ERROR: column "lastfetch" is of type timestamp without time zone but default expression is of type integer HINT: You will need to rewrite or cast the expression. in /usr/share/php/drupal/includes/database.pgsql.inc on line 139.
* user warning: query: CREATE TABLE activitystream_accounts ( uid int_unsigned NOT NULL default 0, module varchar(255), userid varchar(255), password varchar(255), feed varchar(255), lastfetch timestamp without time zone NOT NULL default 0 ) in /usr/share/php/drupal/includes/database.inc on line 515.To fix this in a database-agnostic way, I would recommend changing the default to an actual date/time value that is recognizable by both mysql and postgres, such as the epoch+1 second: "1970-01-01 00:00:01"
Attaching a patch to do exactly that.
| Attachment | Size |
|---|---|
| activitystream.install.patch | 1006 bytes |

#1
Can anyone review this and ensure this fixes Postgres?
#2
I just tested the patch on an install of 6.x-1.0-rc2 and it worked. Thanks for the patch curtis.
#3
Actually, after some errors I've found a spelling error in the original code that wasn't caught in with the patch either.
#4
The move to the schema system and away from SQL queries should have fixed this.