Re: [HACKERS] proposal: schema variables - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: [HACKERS] proposal: schema variables
Date
Msg-id CAFj8pRAi2Xd93ae-SsnMOC5W4hWenmkftTnCrHgdcPpvbOs1bg@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] proposal: schema variables  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: [HACKERS] proposal: schema variables  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers


so 15. 9. 2018 v 18:06 odesílatel Pavel Stehule <pavel.stehule@gmail.com> napsal:




The code is more cleaner now, there are more tests, and documentation is mostly complete. I am sorry - my English is not good.
New features:

o ON COMMIT DROP and ON TRANSACTION END RESET -- remove temp variable on commit, reset variable on transaction end (commit, rollback)
o LET var = DEFAULT -- reset specified variable


fix some forgotten warnings and dependency issue
few more tests


new update:

o support NOT NULL check
o implementation limited transaction variables - these variables doesn't respects subtransactions(this is much more complex), drop variable drops content although the drop can be reverted (maybe this limit will be removed).

CREATE TRANSACTION VARIABLE fx AS int;

LET fx = 10;
BEGIN
  LET fx = 20;
ROLLBACK;

SELECT fx;

Regards

Pavel
 
Regards

Pavel
 
Regards

Pavel


Regards,
Dean
Attachment

pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: Collation versioning
Next
From: Douglas Doole
Date:
Subject: Re: Collation versioning