creating temp table...

From: Lukasz Michalski <zork(at)clan(dot)pl>
To: pgsql-general(at)postgresql(dot)org, pgsql-bugs(at)postgresql(dot)org
Subject: creating temp table...
Date: 2000-04-29 13:54:15
Message-ID: 390AE986.8D600977@clan.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-general

Hi,
I've got PostgreSQL 6.5.2 installed and strange things happens when I
try to create temp table in transaction block.

Here's SQL commands send to backend:

SELECT data FROM aukcje WHERE aukcja_id = '1'
SELECT reklama,logo_loid,logo_content,www,nazwa FROM domy WHERE dom_id =
'0'
BEGIN
SELECT * FROM domy WHERE dom_id = '0'
CREATE TEMPORARY TABLE tmp (obraz_id int,tytul varchar(80),nazwa
varchar(40),obrazm_loid oid,obrazm_content varchar(20))
INSERT INTO tmp SELECT obraz_id,tytul,nazwa,obrazm_loid,obrazm_content
FROM obrazy,autorzy,aukcje WHERE obrazy.autor_id = autorzy.autor_id AND
obrazy.aukcja_id
= aukcje.aukcja_id AND dom_id = '0' AND obrazy.aukcja_id = '1'
DECLARE obraz_cur CURSOR FOR SELECT * FROM tmp
select count(obraz_id) FROM tmp
FETCH FORWARD 10 IN obraz_cur
CLOSE obraz_cur
COMMIT

Everything is going fine but from time to time I've got something like
this:

SELECT data FROM aukcje WHERE aukcja_id = '1'
SELECT reklama,logo_loid,logo_content,www,nazwa FROM domy WHERE dom_id =
'0'
BEGIN
SELECT * FROM domy WHERE dom_id = '0'
CREATE TEMPORARY TABLE tmp (obraz_id int,tytul varchar(80),nazwa
varchar(40),obrazm_loid oid,obrazm_content varchar(20))

Warning: PostgresSQL query failed: pqReadData() -- backend closed the
channel unexpectedly. This probably means the backend terminated
abnormally before or while
processing the request. in common.inc on line 19

[message wrapped by php interpreter]

Any suggestions? Is this a bug in backend server or something is wrong
with my SQL ?

thanks for any help

--
Łukasz Michalski
mailto:zork(at)clan(dot)pl

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2000-04-29 14:47:59 Re: creating temp table...
Previous Message Peter Eisentraut 2000-04-28 10:27:23 Re: security problem ?

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2000-04-29 14:47:59 Re: creating temp table...
Previous Message Ray Alba 2000-04-29 12:12:18 ERROR CODE