Drupal tries to insert a blank string ('') in an integer column in PostgreSQL

Nimish P - April 28, 2006 - 17:39
Project:Drupal
Version:4.6.9
Component:base system
Category:bug report
Priority:normal
Assigned:Unassigned
Status:won't fix
Description

Drupal user and node modules attempt to insert a blank string ('') in when the input is not specified for an integer column. MySQL allows this but not PostgreSQL. This results in a DB error.

This problem was found in node.module and user.module.

Some discussion of this issue exists in http://drupal.org/node/27870

#1

Nimish P - April 28, 2006 - 17:58

A patch that includes fix for the Drupal core modules - user.module and node.module.

Works for Drupal 4.6.6.

AttachmentSize
pg_query.patch.txt2.16 KB

#2

Nimish P - April 28, 2006 - 18:11
Status:active» patch (code needs review)

#3

markus_petrux - April 28, 2006 - 18:17
Status:patch (code needs review)» patch (code needs work)

I believe it would be best to use %d for integers, rather than '%s'

#4

magico - August 21, 2006 - 17:18

Would this be a much wider problem related to postgresql support?

#5

magico - August 26, 2006 - 18:05
Version:4.6.6» 4.6.9
Status:patch (code needs work)» won't fix

Closing due the the low interest in this.

 
 

Drupal is a registered trademark of Dries Buytaert.