Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Ufb1R-0001aP-VB for pgsql-general@arkaria.postgresql.org; Thu, 23 May 2013 19:17:58 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1Ufb1R-0005GB-Bw for pgsql-general@arkaria.postgresql.org; Thu, 23 May 2013 19:17:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UfPuD-0001sT-7C for pgsql-general@postgresql.org; Thu, 23 May 2013 07:25:45 +0000 Received: from mailrelay.usj.edu.lb ([193.227.187.142]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UfPu3-0001UI-Dn for pgsql-general@postgresql.org; Thu, 23 May 2013 07:25:43 +0000 X-ASG-Debug-ID: 1369294197-05fac143c9164960001-zW6XKP Received: from Citrus.usj.edu.lb (rectorat2.usj.edu.lb [193.227.187.140]) by mailrelay.usj.edu.lb with ESMTP id DYo2JIU6z7RzrZhL for ; Thu, 23 May 2013 10:29:57 +0300 (EEST) X-Barracuda-Envelope-From: ptufenkji@usj.edu.lb X-Barracuda-Apparent-Source-IP: 193.227.187.140 Received: from PCPTUFENKJI ([192.168.15.26]) by Citrus.usj.edu.lb (8.13.1/8.13.1) with ESMTP id r4N7PRhc023853 for ; Thu, 23 May 2013 10:25:29 +0300 From: "Pascal Tufenkji" To: Subject: Temp tables Date: Thu, 23 May 2013 10:24:17 +0300 X-ASG-Orig-Subj: Temp tables Message-ID: <008f01ce5786$8a6f57b0$9f4e0710$@usj.edu.lb> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0090_01CE579F.AFBD2BF0" X-Mailer: Microsoft Outlook 14.0 Thread-Index: Ac5XhWyBWuUdYMMpQoKHfU8vR+oogQ== Content-Language: en-us X-USJ-MailScanner-Information: Please contact the ISP for more information X-USJ-MailScanner: Found to be clean X-USJ-MailScanner-From: ptufenkji@usj.edu.lb X-Barracuda-Connect: rectorat2.usj.edu.lb[193.227.187.140] X-Barracuda-Start-Time: 1369294197 X-Barracuda-URL: http://mailrelay.usj.edu.lb:8000/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at usj.edu.lb X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=5.0 tests=HTML_MESSAGE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.131773 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 HTML_MESSAGE BODY: HTML included in message X-Pg-Spam-Score: -3.0 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org This is a multipart message in MIME format. ------=_NextPart_000_0090_01CE579F.AFBD2BF0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, =20 To enhance the performance of the queries, I use temp tables in my = website reports. It seems that a temp table has not been dropped automatically in a = certain session, and now the report is giving an error since the temp table = already exists ?! =20 When I type the following, the database gives me an error: dragon=3D# CREATE TEMP TABLE _parcours (id int); ERROR: type "_parcours" already exists =20 1. How can I identify the session in which the temp table is still locked, so I can drop it manually 2. Why does those cases happen and the temp tables don=92t drop automatically =20 I=92d appreciate a quick reply=20 Thanks in advance =20 =20 Pascal TUFENKJI Service de Technologie de l'Information Universit=E9 Saint-Joseph - Rectorat Tel: +961 1 421 132 Email: ptufenkji@usj.edu.lb =20 ------=_NextPart_000_0090_01CE579F.AFBD2BF0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Hi,

 

To enhance = the performance of the queries, I use temp tables in my website = reports.

It seems that a temp table = has not been dropped automatically in a certain session, and now the = report is giving an error since the temp table already exists = ?!

 

When I type the following, the database gives me an = error:

dragon=3D# CREATE TEMP TABLE = _parcours (id int);

ERROR:=A0 type "_parcours" = already exists

 

1.       = How can I identify the = session in which the temp table is still locked, so I can drop it = manually

2.       = Why does those cases = happen and the temp tables don’t drop = automatically

 

I’d appreciate a quick reply

Thanks in advance

 

 

Pascal TUFENKJI
Service de = Technologie de l'Information
Universit=E9 Saint-Joseph - = Rectorat
Tel: +961 1 421 132
Email:
ptufenkji@usj.edu.lb

 

------=_NextPart_000_0090_01CE579F.AFBD2BF0--