Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Bug Reports » SQL error upon log in (PostgreSQL) (Select 1 subquery cannot compare to boolean in PostgreSQL)
SQL error upon log in (PostgreSQL) [message #4260] Mon, 16 June 2014 06:17 Go to previous message
kong is currently offline  kong
Messages: 90
Registered: December 2011
Member
Upon log in, system produces
Fatal Error: PostgreSQL: ERROR: 42883: operator does not exist: integer = boolean LINE 9: WHERE ip_address_valid=true AND access_allowed=true ^ HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. LOCATION: op_error, src\backend\parser\parse_oper.c:722 (# 42883)

SQL query: SELECT * FROM ( SELECT x.task_id, x.task_desc, x.script_id, x.pattern_id, mnu_nav_button.button_text, mnu_nav_button.context_preselect, (SELECT 1 FROM mnu_role_task WHERE task_id=mnu_nav_button.task_id_jnr AND role_id IN('H_GM') LIMIT 1) AS access_allowed, true AS ip_address_valid, mnu_nav_button.sort_seq FROM mnu_nav_button LEFT JOIN mnu_task ON (mnu_task.task_id = mnu_nav_button.task_id_snr) LEFT JOIN mnu_task AS x ON (x.task_id = mnu_nav_button.task_id_jnr) WHERE x.is_disabled='N' AND mnu_task.task_id='mnu_motd(show)' ) AS x WHERE ip_address_valid=true AND access_allowed=true ORDER BY sort_seq asc

Error in line 722 of file 'D:\Pet\PHP Full Env\UwAmp\www\radpg184\includes\dml.pgsql.class.inc'.
It appears that the subquery
(SELECT 1 FROM mnu_role_task WHERE task_id=mnu_nav_button.task_id_jnr AND role_id IN('H_GM') LIMIT 1) AS access_allowed
does not return a boolean value and in PostgreSQL cannot be compared to
true
A possible fix would be to use EXISTS and change the subquery to
EXISTS(SELECT 1 FROM mnu_role_task WHERE task_id=mnu_nav_button.task_id_jnr AND role_id IN('H_GM') LIMIT 1) AS access_allowed

[Updated on: Mon, 16 June 2014 06:19]

Report message to a moderator

 
Read Message
Read Message
Previous Topic: Error after login (with Postgresql database)
Next Topic: Error update column to popup with Postgresql
Goto Forum:
  


Current Time: Mon Dec 23 14:08:38 EST 2024

Total time taken to generate the page: 0.01102 seconds