Received: from mailout06.sul.t-online.com (mailout06.sul.t-online.com [194.25.134.19]) by hub.org (8.10.1/8.10.1) with ESMTP id e6LBLYh62162; Fri, 21 Jul 2000 07:21:34 -0400 (EDT) Received: from fwd02.sul.t-online.com by mailout06.sul.t-online.com with smtp id 13Fas0-00075P-03; Fri, 21 Jul 2000 13:21:32 +0200 Received: from hot.jw.home (340000654369-0001@[62.158.181.93]) by fwd02.sul.t-online.com with esmtp id 13Fark-1xUJfdC; Fri, 21 Jul 2000 13:21:16 +0200 Received: (from wieck@localhost) by hot.jw.home (8.8.5/8.8.5) id NAA04015; Fri, 21 Jul 2000 13:02:44 +0200 From: JanWieck@t-online.de (Jan Wieck) Message-Id: <200007211102.NAA04015@hot.jw.home> Subject: Re: [BUGS] problem with view and case - please help In-Reply-To: <39780EEE.BBCB6406@technologist.com> from Ange Michel POZZO at "Jul 21, 2000 10:50:54 am" To: poange@technologist.com Date: Fri, 21 Jul 2000 13:02:44 +0200 (MEST) CC: pgsql-sql@postgresql.org, pgsql-general@postgresql.org, pgsql-bugs@postgresql.orgg Reply-To: Jan Wieck X-Mailer: ELM [version 2.4ME+ PL68 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Sender: 340000654369-0001@t-dialin.net X-Archive-Number: 200007/778 Ange Michel POZZO wrote: > I repost my message because it seems that my previous post don't go on > > i use [PostgreSQL 6.5.2 on i686-pc-linux-gnu, compiled by gcc 2.95.2] > rpm version of Linux Mandrake 7.02 > That's definitely the problem. I cannot recreate it with current CVS sources. The view generates a rewrite rule of ~40K. So v6.5.2 wouldn't be able to store it anyway. 7.0 should, because it seems extremely good compressable (octet length of 2.7K). So give our latest release a try. > i try this query : > > [ange@ange ange]$ psql zonecommerce -h 192.0.1.84 -u -f toto.sql > Username: postgres > Password: > > DROP VIEW liste_browser ; > ERROR: Rule or view 'liste_browser' not found <-------- this ok > because view does not exist at this time > CREATE VIEW browser > AS > SELECT > agent_i, > CASE > WHEN agent_i LIKE '%MSIE 2.0;%' THEN 'Internet Explorer 2.0' > WHEN agent_i LIKE '%MSIE 3.0;%' THEN 'Internet Explorer 3.0' > WHEN agent_i LIKE '%MSIE 3.0a;%' THEN 'Internet Explorer 3.0a' > WHEN agent_i LIKE '%MSIE 3.0B;%' THEN 'Internet Explorer 3.0B' > WHEN agent_i LIKE '%MSIE 3.01;%' THEN 'Internet Explorer 3.01' > WHEN agent_i LIKE '%MSIE 3.02;%' THEN 'Internet Explorer 3.02' > WHEN agent_i LIKE '%MSIE 4.0b1;%' THEN 'Internet Explorer 4.0 beta 1' > [...] OTOH, the previous suggestion of using a function seems more appropriate. PL/Tcl for example has very powerful regular expression capabilities, that could simplify it alot. Jan -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #================================================== JanWieck@Yahoo.com #