Skip to content

Updating stored procedures fails with a syntax error, even with valid SQL code. #10059

@rbrooklyn

Description

@rbrooklyn

Please note that security bugs or issues should be reported to security@pgadmin.org.

Describe the bug

Trying to update a stored procedure, PGAdmin is giving an error, however, the code is perfectly valid.

When edited manually using a query, it works fine.

To Reproduce

Steps to reproduce the behavior:

  1. Right click a stored procedure.
  2. Make a change
  3. Try to save

Expected behavior

Stored procedure should be updated.

It seems the SQL being created is incomplete. The SQL generated by right clicking and asking to edit the procedure is this:

Image

But when I ask for a create script on the same object, it looks like this:

Image

I presume the "AS $BODY$" line is required.

Error message

syntax error is shown. The exact error varies based on the script being edited.

Screenshots

Image

Desktop (please complete the following information):

  • OS: Windows 11
  • pgAdmin version: 9.15
  • Mode: Desktop
  • Package type: Windows .exe file

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions