I have this error when post new blog or page or story entry with a privilege user

warning: pg_query(): Query failed: ERROR: invalid input syntax for integer: "" in /usr/local/apache/htdocs/www.psql.it/drupal/includes/database.pgsql.inc on line 45.

user error:
query: INSERT INTO node (title, body, format, uid, type, teaser, status, moderate, promote, sticky, comment, created, changed, nid) VALUES('werwer', 'werwerweqwerwqe', '3', '2', 'blog', 'werwerweqwerwqe', '1', '', '', '1', '2', '1142980381', '1142980381', '5') in /usr/local/apache/htdocs/www.psql.it/drupal/includes/database.pgsql.inc on line 62.

I use drupal 4.6.6, postgres 8.1.3, linux

I have no error if the privilege user have "administer nodes" setting on

Thanks
Osvaldo

Comments

markstos’s picture

I can confirm this. The issue is that PostgreSQL doesn't know what is meant by '' when applied to an integer field. It could mean "0" or it could mean NULL. Rather than possibly doing the wrong thing, it returns an error, making the user write clearer code.