pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: JanWieck@t-online.de
To: poange@technologist.com
Cc: pgsql-sql@postgresql.org
Cc: pgsql-general@postgresql.org
Cc: pgsql-bugs@postgresql.orgg
Subject: Re: [BUGS] problem with view and case - please help
Date: Fri, 21 Jul 2000 13:02:44 +0200 (MEST)
Message-ID: <200007211102.NAA04015@hot.jw.home> (raw)
In-Reply-To: <39780EEE.BBCB6406@technologist.com>

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 #





view thread (6+ messages)  latest in thread

Message-ID: <200007211102.NAA04015@hot.jw.home>
Permalink:  ../200007211102.NAA04015@hot.jw.home/
Also on:    postgresql.org/message-id/200007211102.NAA04015@hot.jw.home

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: JanWieck@t-online.de, poange@technologist.com, pgsql-general@postgresql.org, pgsql-bugs@postgresql.orgg
  Subject: Re: [BUGS] problem with view and case - please help
  In-Reply-To: <200007211102.NAA04015@hot.jw.home>
  References: <39780EEE.BBCB6406@technologist.com> <200007211102.NAA04015@hot.jw.home>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox