PostgreSQL (drupal_write_record) fix

roderik - October 14, 2009 - 13:30
Project:Utility
Version:6.x-3.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review
Description

Hi,

REPLACE INTO does not work on PostgreSQL, and I had just read through other code using drupal_write_record(). (twitter/twitter.inc)
So I copied those lines.

By the way, hook_schema should be named after the module, not after the table. (If you don't rename that function in system_module.install, drupal_get_schema('system_module_users') will return nothing, and drupal_write_record() will do nothing.)

AttachmentSize
drupal_write_record.patch1.54 KB

#1

roderik - October 14, 2009 - 13:32
Status:postponed» needs review

wrong status

#2

roderik - October 15, 2009 - 00:24

Ofcourse it helps if I take a few seconds to see what changes these effects have...

Here's a better patch.

AttachmentSize
drupal_write_recordCORRECT.patch 1.76 KB
 
 

Drupal is a registered trademark of Dries Buytaert.