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

Re: problem with view and case - please help

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: poange(at)technologist(dot)com
Cc: pgsql-sql(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org, pgsql-bugs(at)postgresql(dot)org
Subject: Re: problem with view and case - please help
Date: 2000-07-21 14:27:07
Message-ID: 13008.964189627@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-generalpgsql-sql
Ange Michel POZZO <poange(at)technologist(dot)com> 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

In response to

pgsql-sql by date

Next:From: Ange Michel POZZODate: 2000-07-21 14:41:06
Subject: Re: [SQL] problem with view and case - please help
Previous:From: D'Arcy J.M. CainDate: 2000-07-21 13:58:15
Subject: Re: using OID as primary key

pgsql-bugs by date

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

pgsql-general by date

Next:From: Ange Michel POZZODate: 2000-07-21 14:41:06
Subject: Re: [SQL] problem with view and case - please help
Previous:From: Hannu KrosingDate: 2000-07-21 11:56:33
Subject: Re: [HACKERS] 8Ko limitation

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