From: | Gilles Darold <gilles(dot)darold(at)dalibo(dot)com> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal: schema variables |
Date: | 2017-11-01 22:13:47 |
Message-ID: | f6bd1e6f-80a6-2bb8-dd7e-8a692ce21cdf@dalibo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-performance |
Le 01/11/2017 à 05:15, Pavel Stehule a écrit :
>
>
> 2017-10-31 22:28 GMT+01:00 srielau <serge(at)rielau(dot)com
> <mailto:serge(at)rielau(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2017-11-02 01:33:52 | Re: Statement-level rollback |
Previous Message | Tom Lane | 2017-11-01 22:06:28 | Re: index-only count(*) for indexes supporting bitmap scans |
From | Date | Subject | |
---|---|---|---|
Next Message | Gunther | 2017-11-02 00:28:41 | OLAP/reporting queries fall into nested loops over seq scans or other horrible planner choices |
Previous Message | Pavel Stehule | 2017-11-01 19:19:48 | Re: proposal: schema variables |