Postgres support

HorsePunchKid - July 7, 2008 - 20:10
Project:Activity Stream
Version:5.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:akalsey
Status:closed
Description

Here's a patch that offers Postgres support. I've tested install and uninstall against Postgres 8.

I also had to change the call to update_sql to just db_query; I'm not quite sure why, but I was getting an undefined function error upon uninstallation.

AttachmentSize
activitystream_5.x-1.0_postgres_0.patch2.54 KB

#1

HorsePunchKid - July 7, 2008 - 21:11

This patch fixes several problematic queries. It seems to basically be working now, though I've only tested the Last.fm and generic feed types.

AttachmentSize
activitystream_5.x-1.0_postgres_1.patch 8.23 KB

#2

akalsey - July 22, 2008 - 19:56
Assigned to:Anonymous» akalsey

Have you also tested on MySQL to ensure that your patch doesn't break MySQL support?

#3

HorsePunchKid - August 9, 2008 - 20:24
Version:5.x-1.0» 5.x-1.1

Patch updated against 5.x-1.1 and tested against both Postgres and MySQL. Seems to be working fine. The main thing here is not to use double quotes inside SQL queries. It's nonstandard, and Postgres will not accept them.

I haven't tested the various sub-modules, but this patch doesn't touch them, either.

AttachmentSize
activitystream_5.x-1.1_postgres_3.patch 5.13 KB

#4

HorsePunchKid - August 9, 2008 - 20:48

Fixed another Postgres error during cron. Retested against PG and MySQL, including running cron this time.

AttachmentSize
activitystream_5.x-1.1_postgres_4.patch 5.48 KB

#5

akalsey - August 10, 2008 - 17:35
Status:needs review» fixed

Commited.

#6

akalsey - August 16, 2008 - 19:35
Status:fixed» closed

in 1.2

#7

jaydub - October 6, 2008 - 10:55
Version:5.x-1.1» 5.x-1.x-dev
Status:closed» needs review

A couple issues:

  • The new column 'changed' added to the activitystream table is not
    defined correctly for PostgreSQL
  • New index on column nid in the activitystream table as defined in the
    update #2 is not in the table definition for either MySQL or PostgreSQL
  • Update function #2 will not work when updating a PostgreSQL installation
    as the update SQL has MySQL-specific SQL.

Patch addresses these issues

AttachmentSize
activitystream.install.279567.patch 1.93 KB

#8

akalsey - October 14, 2008 - 04:50

If someone else who uses postgres can review this patch, I'll commit.

New index on column nid in the activitystream table as defined in the
update #2 is not in the table definition for either MySQL or PostgreSQL

That's because that index is useless. It snuck in the backdoor through an unrelated patch.

#9

akalsey - November 10, 2009 - 00:21
Status:needs review» closed

Closing. d6 schemas should be working for Postgres and D5 has been marked as end of life

 
 

Drupal is a registered trademark of Dries Buytaert.