From: | JanWieck(at)t-online(dot)de (Jan Wieck) |
---|---|
To: | poange(at)technologist(dot)com |
Cc: | pgsql-sql(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org, pgsql-bugs(at)postgresql(dot)orgg |
Subject: | Re: [BUGS] problem with view and case - please help |
Date: | 2000-07-21 11:02:44 |
Message-ID: | 200007211102.NAA04015@hot.jw.home |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-general pgsql-sql |
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(at)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(at)Yahoo(dot)com #
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2000-07-21 14:27:07 | Re: problem with view and case - please help |
Previous Message | jfaith | 2000-07-21 10:54:27 | postgres bug report |
From | Date | Subject | |
---|---|---|---|
Next Message | Hannu Krosing | 2000-07-21 11:56:33 | Re: [HACKERS] 8Ko limitation |
Previous Message | Volker Paul | 2000-07-21 09:10:50 | Re: problem with view and case - please help |
From | Date | Subject | |
---|---|---|---|
Next Message | Markus Wagner | 2000-07-21 11:47:43 | using OID as primary key |
Previous Message | Emils Klotins | 2000-07-21 09:13:50 | Re: referencing serials |