public inbox for pgsql-performance@postgresql.org  
help / color / mirror / Atom feed
From: Gilles Darold <gilles.darold@dalibo.com>
To: Pavel Stehule <pavel.stehule@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: proposal: schema variables
Date: Wed, 1 Nov 2017 23:13:47 +0100
Message-ID: <f6bd1e6f-80a6-2bb8-dd7e-8a692ce21cdf@dalibo.com> (raw)
In-Reply-To: <CAFj8pRAnkj68ORyU7d3CtUER4-=c3oD0eU8=OLjA2UFv3orx2A@mail.gmail.com>
References: <CAFj8pRDY+m9OOxfO10R7J0PAkCCauM-TweaTrdsrsLGMb1VbEQ@mail.gmail.com>
	<20171026220732.GI4496@localhost>
	<CAFj8pRAemkdaDuoRQzrhs2GU59Bb_yHuquJC6nyrwGHfVdLuLw@mail.gmail.com>
	<1509399760322-0.post@n3.nabble.com>
	<CAFj8pRC3jq38zpNRJjQepkQKogfKC=0teb4OviZ7RwZ4je8ymQ@mail.gmail.com>
	<5665be80-1772-4998-8dbc-3bd071c0d9ad@rielau.com>
	<CAFj8pRB9YEzD_-qno8Y2Xj08f4gu2LYJFBd1QDW82EKPW-vmsQ@mail.gmail.com>
	<1509485317393-0.post@n3.nabble.com>
	<CAFj8pRAnkj68ORyU7d3CtUER4-=c3oD0eU8=OLjA2UFv3orx2A@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Le 01/11/2017 à 05:15, Pavel Stehule a écrit :
>
>
> 2017-10-31 22:28 GMT+01:00 srielau <serge@rielau.com
> <mailto:serge@rielau.com>>:
>
>     Pavel,
>
>     There is no
>     DECLARE TEMP CURSOR
>     or
>     DECLARE TEMP variable in PLpgSQL
>     and
>
>
> sure .. DECLARE TEMP has no sense, I talked about similarity DECLARE
> and CREATE TEMP
>
>
>     CREATE TEMP TABLE has a different meaning from what I understand you
>     envision for variables.
>
>     But maybe I'm mistaken. Your original post did not describe the entire
>     syntax:
>     CREATE [TEMP] VARIABLE [IF NOT EXISTS] name AS type
>       [ DEFAULT expression ] [[NOT] NULL]
>       [ ON TRANSACTION END { RESET | DROP } ]
>       [ { VOLATILE | STABLE } ];
>
>     Especially the TEMP is not spelled out and how its presence affects or
>     doesn't ON TRANSACTION END.
>     So may be if you elaborate I understand where you are coming from.
>
>
> TEMP has same functionality (and implementation) like our temp tables
> - so at session end the temp variables are destroyed, but it can be
> assigned to transaction.

Oh ok, I understand thanks for the precision.

-- 
Gilles Darold
Consultant PostgreSQL
http://dalibo.com - http://dalibo.org



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: pgsql-performance@postgresql.org
  Cc: gilles.darold@dalibo.com, pavel.stehule@gmail.com, pgsql-hackers@postgresql.org
  Subject: Re: proposal: schema variables
  In-Reply-To: <f6bd1e6f-80a6-2bb8-dd7e-8a692ce21cdf@dalibo.com>

* 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