Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-generalpgsql-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

pgsql-sql by date

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

pgsql-bugs by date

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

pgsql-general by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group