[drupal-devel] [bug] [PGSQL] node_save, design flaw

Thomas Ilsche drupal-devel at drupal.org
Sat Aug 27 19:50:00 UTC 2005

Issue status update for 
Post a follow up: 

 Project:      Drupal
 Version:      cvs
 Component:    node.module
 Category:     bug reports
 Priority:     critical
 Assigned to:  Anonymous
 Reported by:  Thomas Ilsche
 Updated by:   Thomas Ilsche
 Status:       patch (code needs work)

http://drupal.org/node/17656 might be a better solution for the problem.

Thomas Ilsche

Previous comments:

Sat, 27 Aug 2005 18:42:23 +0000 : Thomas Ilsche

Attachment: http://drupal.org/files/issues/pgsql_node_save.patch (764 bytes)

on pgsql node_save produces errors when saving certain fields like the
boolean sticky. FALSE as string returns as '' instead of 0 as it should
be in db - resulting in this error:

warning: pg_query() [<a
Query failed: ERROR:  invalid input syntax for integer: &quot;&quot; in
D:\amp\htdocs\projekte\drupal_head\includes\database.pgsql.inc on line
user error:
INSERT INTO node (title, body, format, uid, type, teaser, status,
moderate, promote, sticky, comment, created, changed, nid)
VALUES('!SimpleTest test node! simpletest_xwn9wlV2_S', '!SimpleTest
test body! simpletest_oiZZeQw0LqeHVhfrk0twJ_RYNOQbbB5p
simpletest_WU5E8tu0dmtvwg_1RN7B9byh5OuFw02u', '1', '12', 'page',
'!SimpleTest test body! simpletest_oiZZeQw0LqeHVhfrk0twJ_RYNOQbbB5p
simpletest_WU5E8tu0dmtvwg_1RN7B9byh5OuFw02u', '1', '', '1', '', '2',
'1125165026', '1125165026', '5') in
D:\amp\htdocs\projekte\drupal_head\includes\database.pgsql.inc on line

I consider this a quite major design flaw as the looped general
mixed->string conversion strongly relies on the forgiving string->mixed
conversions of MySQL.

However I have crafted a fix that solves the issue for me when creating
pages, maybe needs more work or even redesign.
Thats the curse of dynamic typing!

More information about the drupal-devel mailing list