Обсуждение: view problems

Поиск
Список
Период
Сортировка

view problems

От
pgsql@gefi.ml.org
Дата:
Hi!

I want to create a view, but it crashes my backend (postgresql 6.3.2):

CREATE TABLE access
(
 host
char(200),
 ident
char(200),
 authuser
char(200),
 accdate
datetime,
 request
char(500),
 ttime
int2,
 statuts
int2,
 bytes
int4);
CREATE

insert into access values
('test','test','test','10-08-98','test','1','0','5555');
INSERT 36060304
1
select trim(host) as host,min(accdate),max(accdate),sum(bytes) from
access group by host;
host|min                          |max                          |
sum
----+-----------------------------+-----------------------------+----
test|Thu Oct 08 00:00:00 1998 CEST|Thu Oct 08 00:00:00 1998
CEST|5555
(1
row)

drop view
test2;
DROP
create view test2 as select trim(host) as host,accdate,bytes from
access;
CREATE
select * from
test2;
host|accdate
|bytes
----+-----------------------------+-----
test|Thu Oct 08 00:00:00 1998 CEST|
5555
(1
row)

drop view
test;
DROP
create view test as select trim(host) as
host,min(accdate),max(accdate),sum(bytes) from access group by host;
CREATE
select * from
test;
PQexec() -- Request was sent to backend, but backend closed the channel
before responding.
        This probably means the backend terminated abnormally before or
while processing the request.
EOF


Any hints?

Gerald Fischer

Re: [GENERAL] view problems

От
Bruce Momjian
Дата:
> Hi!
>
> I want to create a view, but it crashes my backend (postgresql 6.3.2):
>
> CREATE TABLE access

We don't support aggregates on views in 6.3, and sometimes it crashes.
6.4 has a new rewritten viw system, so it should work then.

6.4 beta is September 1.

--
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)