Missing PostgreSQL support

plj - August 29, 2007 - 13:59
Project:Default Filter
Version:5.x-2.1
Component:Code
Category:bug report
Priority:normal
Assigned:dllh
Status:reviewed & tested by the community
Description

PostgreSQL support in Drupal 5 and many critical third-party modules is already so pervasive, that it is quite frustrating to see small and simple modules that have this homework undone, and not even any warning about incompatibility in place.

I've attached a patch that adds PostgreSQL support to .install file and fixes the module. But the actual format selection does not seem to work – I have yet to investigate if that is due to some already-reported bug.

AttachmentSize
default_filter_0.patch2.27 KB

#1

plj - August 29, 2007 - 14:00
Status:active» needs review

Submitted with wrong status; fixed.

#2

dllh - August 31, 2007 - 20:02
Assigned to:Anonymous» dllh
Status:needs review» fixed

I've applied your patch and committed to svn. Re postgres support, I'm sympathetic, but this was a quick itch-scratch module that I thought it'd be nice to contribute, and to be fair, it's still in dev, so lack of postgres support seems forgivable. Not an issue any more thanks to you, though.

#3

plj - September 5, 2007 - 14:03
Status:fixed» needs review

I did not understand that this module only supports non-CCK content types until I red #172962, and this is why it never worked for me. When I finally discovered the reason, I tried with ordinary content type and found yet another PostgreSQL bug. Since dllh already committed my previous patch (thanks for that!), I'm posting a new one that fixes only this later issue. Now it really works! (Although only with non-CCK node types.)

FYI: For PostgreSQL, CONCAT is not a native function, but one added by Drupal installer to make it accept more MySQL-ish (non-ANSI SQL) syntax. It only allows concatenation of two items, so instead of CONCAT(format_id, '.', role_id), we need to write CONCAT(format_id, CONCAT('.', role_id)).

AttachmentSize
default_filter_1.patch 1.24 KB

#4

plj - September 5, 2007 - 15:09

There was yet a junk comment that contained an old, erroneus version of the query that was fixed in the previous patch.

New patch attached.

AttachmentSize
default_filter_2.patch 1.24 KB

#5

davidwhthomas - January 29, 2008 - 01:02

Thanks, this fixed the postgres error, but still, the default format is not selected, none are!

#6

davidwhthomas - January 29, 2008 - 01:28

Ok, it seems the root user bypasses the default input format and none are selected when logged in as the root user.

When logged in as a regular user, the settings work.

thanks!

DT

#7

pearcec - September 12, 2008 - 18:14
Status:needs review» reviewed & tested by the community

Works like a champ.

#8

plj - February 19, 2009 - 22:20
Version:5.x-1.x-dev» 5.x-2.1

This should be applied against HEAD. There is some offset, but it still applies.

(And default_filter needs to be branched for Drupal 6.)

 
 

Drupal is a registered trademark of Dries Buytaert.