X-Original-To: pgsql-sql@postgresql.org Received: from localhost (developer.postgresql.org [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id C87D9925437 for ; Wed, 28 May 2003 21:12:00 -0400 (EDT) Received: from developer.postgresql.org ([64.117.224.193]) by localhost (developer.postgresql.org [64.117.224.193:10024]) (amavisd-new) with ESMTP id 82343-09 for ; Wed, 28 May 2003 21:11:59 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by developer.postgresql.org (Postfix) with ESMTP id E828D925426 for ; Wed, 28 May 2003 21:11:58 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h4T1BxU6012586; Wed, 28 May 2003 21:11:59 -0400 (EDT) To: "jack" Cc: pgsql-sql@postgresql.org Subject: Re: The problems about temporary tables in V7.3.2 In-reply-to: <001a01c32577$ccee2180$1400a8c0@jac> References: <001a01c32577$ccee2180$1400a8c0@jac> Comments: In-reply-to "jack" message dated "Thu, 29 May 2003 10:17:56 +1000" Date: Wed, 28 May 2003 21:11:58 -0400 Message-ID: <12585.1054170718@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/544 X-Sequence-Number: 13709 "jack" writes: > A view is created with a normal table xx without a schema specified. And > before using the view, a temporary table xx , which has the same name as the > normal table xx used by the view. In the same connection session, it > supposes the view would read the temporary table. But actually it always > reads the normal table instead of temporary table. The same thing happens to > the table specified with a schema. If a SELECT statement uses a table with a > schema specified, the SELECT statement won't read the temporary table when > it exists with the same name. I just wonder the schema feature just removes > the access priority of the temporary tables. This is all the intended behavior. regards, tom lane