Re: problem with view and case - please help
Volker Paul <vpaul@dohle.com>
From: Volker Paul <vpaul@dohle.com>
To: poange@technologist.com
Cc: pgsql-sql@postgresql.org
Date: 2000-07-21T09:10:50Z
Lists: pgsql-bugs
> CREATE VIEW browser > AS > SELECT > agent_i, > CASE > WHEN agent_i LIKE '%MSIE 2.0;%' THEN 'Internet Explorer 2.0' > ... > agent_i NOT LIKE '%compatible%' THEN 'Netscape' > WHEN agent_i LIKE 'Mozilla/5.0 %' AND agent_i NOT LIKE '%MSIE%' AND > agent_i NOT LIKE '%compatible%' THEN 'Netscape' > WHEN agent_i LIKE 'Mozilla/6.0 %' AND agent_i NOT LIKE '%MSIE%' AND > agent_i NOT LIKE '%compatible%' THEN 'Netscape' > ELSE agent_i END AS navigateur, count (agent_i) > as total from access group by agent_i; > pqReadData() -- backend closed the channel unexpectedly. > This probably means the backend terminated abnormally > before or while processing the request. > We have lost the connection to the backend, so further processing is > impossible. Terminating. Query limit exceeded? At least that CASE statement looks rather clumsy, suggest using a function instead. V.Paul