Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e9Hr4-0000MJ-3L for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Oct 2017 21:44:22 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1e9Hr3-0002MW-1d for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Oct 2017 21:44:21 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1e9HpV-0007SB-Gs for pgsql-hackers@postgresql.org; Mon, 30 Oct 2017 21:42:45 +0000 Received: from n3.nabble.com ([162.255.23.22]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e9HpS-0002mo-4g for pgsql-hackers@postgresql.org; Mon, 30 Oct 2017 21:42:44 +0000 Received: from n3.nabble.com (localhost [127.0.0.1]) by n3.nabble.com (Postfix) with ESMTP id 58BE692C2712 for ; Mon, 30 Oct 2017 14:42:40 -0700 (MST) Date: Mon, 30 Oct 2017 14:42:40 -0700 (MST) From: srielau To: pgsql-hackers@postgresql.org Message-ID: <1509399760322-0.post@n3.nabble.com> In-Reply-To: References: <20171026220732.GI4496@localhost> Subject: Re: proposal: schema variables MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Pavel, I wouldn't put in the DROP option. Or at least not in that form of syntax. By convention CREATE persists DDL and makes object definitions visible across sessions. DECLARE defines session private objects which cannot collide with other sessions. If you want variables with a short lifetime that get dropped at the end of the transaction that by definition would imply a session private object. So it ought to be DECLARE'd. As far as I can see PG has been following this practice so far. Cheers Serge Rielau Salesforce.com -- Sent from: http://www.postgresql-archive.org/PostgreSQL-hackers-f1928748.html -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers