Re: problem with view and case - please help

From: Volker Paul <vpaul(at)dohle(dot)com>
To: poange(at)technologist(dot)com
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: problem with view and case - please help
Date: 2000-07-21 09:10:50
Message-ID: 3978139A.3F12604F@dohle.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-general pgsql-sql

> 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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Sezai Yilmaz 2000-07-21 10:35:53 Problem with Turkish localization
Previous Message Ange Michel POZZO 2000-07-21 08:50:54 problem with view and case - please help

Browse pgsql-general by date

  From Date Subject
Next Message Jan Wieck 2000-07-21 11:02:44 Re: [BUGS] problem with view and case - please help
Previous Message Ange Michel POZZO 2000-07-21 08:50:54 problem with view and case - please help

Browse pgsql-sql by date

  From Date Subject
Next Message Emils Klotins 2000-07-21 09:13:50 Re: referencing serials
Previous Message Ange Michel POZZO 2000-07-21 08:50:54 problem with view and case - please help