Re: proposal: schema variables

From: Mark Dilger <hornschnorter(at)gmail(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 18:03:28
Message-ID: 58C95E69-F94E-46E0-98B5-8F52454B4403@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> Comments, notes?

How would variables behave on transaction rollback?

CREATE TEMP VARIABLE myvar;
SET myvar := 1;
BEGIN;
SET myvar := 2;
COMMIT;
BEGIN;
SET myvar := 3;
ROLLBACK;
SELECT myvar;

How would variables behave when modified in a procedure
that aborts rather than returning cleanly?

mark

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2017-11-01 18:20:32 Re: MERGE SQL Statement for PG11
Previous Message Nico Williams 2017-11-01 18:02:38 Re: [PATCH] Add two-arg for of current_setting(NAME, FALLBACK)