Code: Select all
PHP warning: pg_query() [<a href='function.pg-query'>function.pg-query</a>]:
Query failed: ERROR: operator does not exist: character varying = integer LINE 1: ...E faqquestions SET ask_rubrik = 209373 WHERE ask_rubrik = 39 ^ HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. in Pgsql.php on line 94
Code: Select all
UPDATE faqquestions SET ask_rubrik = 223545 WHERE ask_rubrik = 47 message: operator does not exist: character varying = integer
ask_rubrik is a varchar column and not an integer column.
In postgresql 8.2.* quotes around the integer are not needed when updating a varchar column (or an explicit cast from integer to varchar)
In postgresql 8.3.* I believe quotes around the integer are required when updating a varchar column (but I'm not 100% sure)
In postgresql 8.4.* quotes around the integer are needed when updating a varchar when updating a varchar column
There are several possible fixes:
a) always quote the integer => this may create problem elsewhere
b) change the ask_rubrik column to an integer (why is it a varchar?)
c) add extra queries to update faqquestions
d) ....?
In my opinion the best fix would be to update the ask_rubrik column to an integer but I do not know what the impact of this is.
In my phpMyFAQ installation I currently opted to repeat the queries for faqquestions with quotes but I do not see this as the best fix...
(a patch for 2.6.7 that does this is attached as reference)