Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plpgsql: merge macroexpand into EVAL, add DEBUG-EVAL #705

Merged
merged 3 commits into from
Oct 29, 2024

Conversation

asarhaddon
Copy link
Contributor

No description provided.

@asarhaddon asarhaddon force-pushed the plpgsql branch 8 times, most recently from 18c2fc7 to 4e529a0 Compare October 25, 2024 13:22
env.get: loop instead of a recursion, string parameter (merged with
vget), do not raise an exception when the key is missing.

Split eval_ast into eval_{symbol,vector,map} in order to reduce the
diff and improve readability of EVAL.

Use existing blocks to declare variables/constants near the place they
are actually used.  Several were unused.

Simplify try*, perform TCO.
@asarhaddon asarhaddon force-pushed the plpgsql branch 2 times, most recently from 53a2511 to af65425 Compare October 25, 2024 15:07
@asarhaddon
Copy link
Contributor Author

This merge request also adds a test that ^2 is not interpreted as a symbol. The issue is also tested in stepA, but the reader macro should be tested before the metadata system.

As far as I know, the last optional failure was already present (throw always converts its argument to a string). I have not managed to fix it.

By the way, someone with more SQL skills could probably simplify the Dockerfile and/or merge wrap.sh into run.
I have managed to check the syntax as a normal user with the following commands (actually running the tests require dblink, which is not packaged).
The installation of the postgresql Debian package creates the postgres user (details in /usr/share/doc/postgresql-common/README.Debian.gz).

apt install -y postgresql postgresql-contrib
service postgresql start
sudo -u postgres createuser -DRS travis
sudo -u postgres createdb -O travis mal

Then the travis user can psql -dmal, then \cd to the directory and \i the .sql files.

@kanaka kanaka merged commit 1627483 into kanaka:master Oct 29, 2024
114 checks passed
@asarhaddon asarhaddon deleted the plpgsql branch October 30, 2024 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants