serendipity_event_faq PostgeSQL error?

Found a bug? Tell us!!
Post Reply
vastneonwolf
Regular
Posts: 43
Joined: Sun May 22, 2005 6:57 am
Contact:

serendipity_event_faq PostgeSQL error?

Post by vastneonwolf »

Just installed this plugin via Spartacus all seemed to be well until I tried to add a category.
Got this error

Code: Select all

Warning: pg_query(): Query failed: ERROR: invalid input syntax for integer: "" in /var/vhost/writehand.org/html/include/db/postgres.inc.php on line 207
Error in INSERT INTO serendipity_faq_categorys (id,parent_id,category,introduction,catorder) values ('', '0', 'Editors', '', '1')
ERROR: invalid input syntax for integer: ""
Followed by what looks like a complete dump of the DB then this.

Code: Select all

INSERT INTO serendipity_faq_categorys (id,parent_id,category,introduction,catorder) values ('', '0', 'Editors', '', '1')
Warning: pg_query(): Query failed: ERROR: currval of sequence "serendipity_faq_categorys_id_seq" is not yet defined in this session in /var/vhost/writehand.org/html/include/db/postgres.inc.php on line 161

Warning: pg_num_rows(): supplied argument is not a valid PostgreSQL result resource in /var/vhost/writehand.org/html/include/db/postgres.inc.php on line 162

Warning: pg_last_oid(): supplied argument is not a valid PostgreSQL result resource in /var/vhost/writehand.org/html/include/db/postgres.inc.php on line 166
Any help would be appreciated.
Everybody's children are so special. It makes you wonder where all the ordinary grown-ups come from.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: serendipity_event_faq PostgeSQL error?

Post by garvinhicking »

Hi!

That'S true, it's a PGSQL issues, which does not treat '' as integers and thus does inproper casting. MySQL ignores this and just uses an auto_increment value there.

I'm sure Falk (the developer of this plugin) catches up on this thread, and I think it shouldn't be too hard to solve this issue. :-)

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
falk
Regular
Posts: 512
Joined: Tue Sep 27, 2005 10:16 am
Location: DD
Contact:

Post by falk »

Today i send a patch to Garvin. I hope i fix this problem. If not, please contact me again.
Post Reply