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: support DEFAULT syntax in the declaration #122302

Open
yuzefovich opened this issue Apr 12, 2024 · 0 comments
Open

plpgsql: support DEFAULT syntax in the declaration #122302

yuzefovich opened this issue Apr 12, 2024 · 0 comments
Labels
A-sql-routine UDFs and Stored Procedures C-cleanup Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior. O-qa T-sql-queries SQL Queries Team

Comments

@yuzefovich
Copy link
Member

yuzefovich commented Apr 12, 2024

This two definitions are equivalent, but we only currently support the latter:

DROP PROCEDURE IF EXISTS p;
CREATE PROCEDURE p() LANGUAGE PLpgSQL AS $$
DECLARE
    var TEXT DEFAULT 'test';
BEGIN
    RAISE NOTICE '%', var;
END;
$$;
DROP PROCEDURE IF EXISTS p;
CREATE PROCEDURE p() LANGUAGE PLpgSQL AS $$
DECLARE
    var TEXT = 'test';
BEGIN
    RAISE NOTICE '%', var;
END;
$$;

Jira issue: CRDB-37793

@yuzefovich yuzefovich added C-cleanup Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior. O-qa T-sql-queries SQL Queries Team A-sql-routine UDFs and Stored Procedures labels Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sql-routine UDFs and Stored Procedures C-cleanup Tech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior. O-qa T-sql-queries SQL Queries Team
Projects
Status: Backlog
Development

No branches or pull requests

1 participant