Hi all,

The following query abort the backend:

SELECT customer.name, reservation.rno, hotel.name
       FROM customer, reservation, hotel
       WHERE customer.name = 'Porter'
        AND customer.cno = reservation.cno
        AND reservation.hno = hotel.hno;
ERROR:  cannot create temp_39296

- the first time it gives me this message:
    ERROR:  cannot create temp_NUMBER

- the second time it gives me this message:

pqReadData() -- backend closed the channel unexpectedly.
        This probably means the backend terminated abnormally before or while
processing the request.
We have lost the connection to the backend, so further processing is impossible.
Terminating.

Here the tables structure and data:

Table    = customer
+----------------------------------+----------------------------------+-------+
|              Field               |              Type                | Length|
+----------------------------------+----------------------------------+-------+
| cno                              | int4                             |     4 |
| title                            | char()                           |     8 |
| state                            | char()                           |     4 |
| zip                              | int2                             |     2 |
| city                             | varchar()                        |     0 |
| firstname                        | char()                           |     7 |
| name                             | char()                           |     8 |
| account                          | float8                           |     8 |
+----------------------------------+----------------------------------+-------+
select * from customer;
 cno|title   |state| zip|city    |firstname|name    |account
----+--------+-----+----+--------+---------+--------+-------
3391|Mr      |NY   |9001|New York|Joseph   |Porter  |     50
3395|Mr      |CH   |9001|Chicago |Albert   |Keen    |     10
3396|Mrs     |DA   |9024|Dallas  |Joe      |Nook    |     60
(3 rows)

Table    = reservation
+----------------------------------+----------------------------------+-------+
|              Field               |              Type                | Length|
+----------------------------------+----------------------------------+-------+
| cno                              | int4                             |     4 |
| rno                              | int4                             |     4 |
| hno                              | int4                             |     4 |
| arrival                          | date                             |     4 |
| departure                        | date                             |     4 |
+----------------------------------+----------------------------------+-------+
select * from reservation;
 cno|rno|hno|   arrival| departure
----+---+---+----------+----------
3391|  2|  1|1995-12-04|1995-12-31
3395|  3|  2|1997-11-04|1997-12-31
3396|  4|  3|1996-12-14|1996-12-31
(3 rows)

Table    = hotel
+----------------------------------+----------------------------------+-------+
|              Field               |              Type                | Length|
+----------------------------------+----------------------------------+-------+
| hno                              | int4                             |     4 |
| name                             | varchar()                        |     0 |
| city                             | varchar()                        |     0 |
+----------------------------------+----------------------------------+-------+
select * from hotel;
hno|name    |city
---+--------+--------
  1|Sheraton|Chicago
  2|Hilton  |New York
  3|Ritz    |Dallas
(3 rows)
             
Any ideas?

-Jose'-



Mon, 4 Jan 1999 14:46:37 +0100
Sferacarta Software <sferac@bo.nettuno.it>
too many ANDs ?