public inbox for [email protected]  
help / color / mirror / Atom feed
From: tushar <[email protected]>
To: 曾文旌 <[email protected]>
To: Pavel Stehule <[email protected]>
To: Prabhat Sahu <[email protected]>
To: Robert Haas <[email protected]>
Cc: Tomas Vondra <[email protected]>
Cc: Konstantin Knizhnik <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Cc: 蔡松露(子嘉) <[email protected]>
Cc: Cai, Le <[email protected]>
Subject: Re: [Proposal] Global temporary tables
Date: Fri, 24 Apr 2020 18:33:03 +0530
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>
	<CANEvxPrVan7f_JgVr5chaOHGtMHFfL-A5hVcYbQj_-5aYWvDRQ@mail.gmail.com>
	<[email protected]>
	<CANEvxPpAxb30mnWdp4YZvwFF28A3zf3LCuEg91BE1djRTYSZcg@mail.gmail.com>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<CANEvxPoKNoddQ6UYOgXkGSZuc30KVZODySJu1E=a8hs1P7PPgA@mail.gmail.com>
	<[email protected]>
	<CANEvxPp1f1vN3ht6Bww=3yqGi46hUPVaiv8WWZwVMvWvGacVHg@mail.gmail.com>
	<CANEvxPqu2uiNW8r_ZY1iZLe6PwsJ59BY_6YqVRxmGUyUK=v=AA@mail.gmail.com>
	<CANEvxPrSOM26cGnTerCz-pJnNewroqJnw2BF97=BDmz6c+Rn8Q@mail.gmail.com>
	<[email protected]>
	<CAFj8pRCyE4iCp3s8JadPfFQNoZUv-MyMC4HtaxCpS6kiMyJbVA@mail.gmail.com>
	<[email protected]>

On 4/22/20 2:49 PM, 曾文旌 wrote:
>
> I provide the TRUNCATE tablename DROP to clear the data in the GTT and 
> delete the storage files.
> This feature requires the current transaction to commit immediately 
> after it finishes truncate.
>
Thanks Wenjing , Please refer this scenario

postgres=# create global temp table testing (a int);
CREATE TABLE
postgres=# begin;
BEGIN
postgres=*# truncate testing;      -- working   [1]
TRUNCATE TABLE
postgres=*# truncate testing drop;
ERROR:  Truncate global temporary table cannot run inside a transaction 
block    --that is throwing an error claiming something which i did  
successfully [1]
postgres=!#

-- 
regards,tushar
EnterpriseDB  https://www.enterprisedb.com/
The Enterprise PostgreSQL Company






view thread (492+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: [Proposal] Global temporary tables
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox