X-Original-To: pgsql-performance-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id B6C5F9FA30D for ; Fri, 23 Jun 2006 19:08:24 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 20972-05 for ; Fri, 23 Jun 2006 19:08:10 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from thebighonker.lerctr.org (thebighonker.lerctr.org [192.147.25.65]) by postgresql.org (Postfix) with ESMTP id C87DA9F9AD3 for ; Fri, 23 Jun 2006 19:08:11 -0300 (ADT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=lerami; d=lerctr.org; b=SIYrbhWl4xhSaNYjUPtsxg1ZIEQ/oE5j5f9qoyr327tU1Ugx/VDZnAgH1IJc0lzrrucKmqS1thinSfpZPK+00T/SVIsCUFrRxJhESuyb1fFqMyypldB0ZF+L0LZsNDZ35+oIlSOal9lxDy9X7NpI3Yd6kDHRmCNUO85alFgAxfE=; Received: from 64-132-13-2.static.twtelecom.net ([64.132.13.2]:53786 helo=LROSENMAC8010P) by thebighonker.lerctr.org with esmtpsa (TLSv1:RC4-MD5:128) (Exim 4.62 (FreeBSD)) (envelope-from ) id 1Fttos-000F4t-4V; Fri, 23 Jun 2006 17:08:08 -0500 From: "Larry Rosenman" To: "'Franklin Haut'" , Subject: Re: Temporary table Date: Fri, 23 Jun 2006 17:08:05 -0500 Message-ID: <039001c69711$81058a60$0202fea9@aus.pervasive.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <000001c69710$264fe940$8adb02c9@franklin> Thread-Index: AcaWJ6kB91I7F+1CQfamxokjjD/fiQAycwtQAAeoJXAAAFL0AA== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 X-LERCTR-Spam-Score: -4.4 (----) X-LERCTR-Spam-Report: (-4.4 points, 5.0 required) ALL_TRUSTED=-1.8 BAYES_00=-2.599 DomainKey-Status: no signature X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/468 X-Sequence-Number: 19825 Franklin Haut wrote: > Hello, >=20 > I=B4m have some problems with a temporary table, i need create a = table, > insert some values, make a select and at end of transaction the table > must droped, but after i created a table there not more exist, is > this normal ?=20 >=20 > How to reproduce : >=20 >=20 > CREATE TEMP TABLE cademp ( > codemp INTEGER, > codfil INTEGER, > nomemp varchar(50) > ) ON COMMIT DROP; >=20 > INSERT INTO cademp (codemp, codfil, nomemp) values (1,1,'TESTE'); > INSERT INTO cademp (codemp, codfil, nomemp) values (1,2,'TESTE1'); >=20 > Select * from cademp; >=20 >=20 >=20 > In this case, the table cademp doesn=B4t exist at the first insert, in > the same transaction. >=20 It is NOT the same transaction. By default, each STATEMENT is it's own transaction. Stick a BEGIN; before the create table, and a commit; after the select. Larry Rosenman >=20 >=20 >=20 > Tks, >=20 > Franklin >=20 >=20 > ---------------------------(end of > broadcast)--------------------------- TIP 6: explain analyze is your > friend=20 --=20 Larry Rosenman http://www.lerctr.org/~ler Phone: +1 512-248-2683 E-Mail: ler@lerctr.org US Mail: 430 Valona Loop, Round Rock, TX 78681-3893