Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2]) by hub.org (8.10.1/8.10.1) with ESMTP id e6LERCh12127; Fri, 21 Jul 2000 10:27:12 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id KAA13011; Fri, 21 Jul 2000 10:27:08 -0400 (EDT) To: poange@technologist.com cc: pgsql-sql@postgresql.org, pgsql-general@postgresql.org, pgsql-bugs@postgresql.org Subject: Re: problem with view and case - please help In-reply-to: <39780EEE.BBCB6406@technologist.com> References: <39780EEE.BBCB6406@technologist.com> Comments: In-reply-to Ange Michel POZZO message dated "Fri, 21 Jul 2000 10:50:54 +0200" Date: Fri, 21 Jul 2000 10:27:07 -0400 Message-ID: <13008.964189627@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200007/96 Ange Michel POZZO writes: > CREATE VIEW browser > AS > SELECT > agent_i, > CASE > < massive CASE expression > > ELSE agent_i END AS navigateur, count (agent_i) > as total from access group by agent_i; > pqReadData() -- backend closed the channel unexpectedly. Not sure why you are seeing a crash instead of a complaint, but there's no chance of making such a huge VIEW expression work in 6.5 --- the rule text won't fit in 8K. Try it in 7.0.2 (which has still got the 8K limit, but at least it compresses the text). BTW I tend to agree with the other comment that this seems a clumsy way to go about it. I'd think about making a table containing a pattern column and a browser-name column and doing the view as a join. Might be a little tricky to ensure you get only one match, however ... regards, tom lane