pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
postmaster dies on complicated views
2+ messages / 2 participants
[nested] [flat]

* postmaster dies on complicated views
@ 1998-09-18 02:14 David Rugge <davidrugge@mindspring.com>
  1998-09-18 02:58 ` Re: [SQL] postmaster dies on complicated views Bruce Momjian <maillist@candle.pha.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: David Rugge @ 1998-09-18 02:14 UTC (permalink / raw)
  To: pgsql-sql@hub.org

I've had a strange problem with viewing through anything but a basic view.
The view in question is defined as follows:

create view currentinfo
as
select pub_id, type, sum(price*ytd_sales), avg(price), avg(ytd_sales)
from titles
group by pub_id, type;

this is what happens when I do a select * from currentinfo:

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.


What does this message mean?  Once I get this error, I have to quit and
relaunch psql before any other queries are successful. I think the problem
may be with the "sum(price*ytd_sales)" selection, since I tried another
query with multiplication in the select clause and it died too.

Thanks in advance,


-David Rugge
http://www.mindspring.com/~davidrugge/index.html





^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: [SQL] postmaster dies on complicated views
  1998-09-18 02:14 postmaster dies on complicated views David Rugge <davidrugge@mindspring.com>
@ 1998-09-18 02:58 ` Bruce Momjian <maillist@candle.pha.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Bruce Momjian @ 1998-09-18 02:58 UTC (permalink / raw)
  To: davidrugge@mindspring.com; +Cc: pgsql-sql@hub.org

> I've had a strange problem with viewing through anything but a basic view.
> The view in question is defined as follows:
> 
> create view currentinfo
> as
> select pub_id, type, sum(price*ytd_sales), avg(price), avg(ytd_sales)
> from titles
> group by pub_id, type;
> 
> this is what happens when I do a select * from currentinfo:
> 
> 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.
> 
> 
> What does this message mean?  Once I get this error, I have to quit and
> relaunch psql before any other queries are successful. I think the problem
> may be with the "sum(price*ytd_sales)" selection, since I tried another
> query with multiplication in the select clause and it died too.

Can't use aggregates in views.  Sorry.  On the TODO list.

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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~1998-09-18 02:58 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1998-09-18 02:14 postmaster dies on complicated views David Rugge <davidrugge@mindspring.com>
1998-09-18 02:58 ` Bruce Momjian <maillist@candle.pha.pa.us>

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