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 href='/manual/en/function.pg-query.html'>function.pg-query.html</a>]: Query failed: ERROR:  invalid input syntax for integer: &quot;&quot; in D:\amp\htdocs\projekte\drupal_head\includes\database.pgsql.inc on line 76.

user error: 
query: 
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 93.

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!

CommentFileSizeAuthor
pgsql_node_save.patch764 bytesThomas Ilsche
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Thomas Ilsche’s picture

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

Zen’s picture

Status: Needs work » Closed (duplicate)

Marking this as a duplicate. The issue you've linked to also seems to have hit a full stop atm. But, if you'd like to chase this up, please take it up on that thread..

Thanks
-K