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

Creating a function with arguments creates arguments with double quotes #7222

Closed
JanSladky65 opened this issue Feb 17, 2024 · 4 comments
Closed
Labels

Comments

@JanSladky65
Copy link

JanSladky65 commented Feb 17, 2024

When creating a function with the pgadmin function creation dialogue, arguments are created with double quotes in the function definition.
This happens when arguments are input without double quotes and in uppercase.

definition

The effect of this is, that when you insert the code for the function and make use of arguments without double quotes the execution will fail saying "ERROR: column »status« doesn't exist"
Please note: the column is output in lowercase, even if it is written in uppercase.

This happens on Windows 10 pro and
pgadmin 4, 6.18 and pgadmin 8.x

To Reproduce

Steps to reproduce the behavior:

  1. Select a schema in pgadmin
  2. in the Functions menu select "Create" -> "Function"
  3. Fill in an argument in uppercase letter (e.g. STATUS)
    Right click on the created function and select 'Scripts' -> "CREATE script"
    The shown script contains the input argument in double quotes: "STATUS"

Expected behavior
While creating a function and inputting an argument in uppercase pgadmin should not create arguments in double quotes.

Error message

FEHLER: Spalte »status« existiert nicht
LINE 1: SELECT STATUS+4
^
QUERY: SELECT STATUS+4
CONTEXT: PL/pgSQL-Funktion decode(integer) Zeile 2 bei RETURN

Screenshots

If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows-10-10.0.19045-SP0
  • Version: 6.18
  • Mode: Desktop
  • Browser Chromium 108.0.5359.95
  • Package type: standalone installer
@khushboovashi
Copy link
Contributor

Hello @JanSladky65, Please provide the Function DDL and the error screenshot.

@JanSladky65
Copy link
Author

DDL:
script

ERROR:
error

@akshay-joshi akshay-joshi moved this to 🆕 New in Current Sprint (183) Feb 28, 2024
@pravesh-sharma pravesh-sharma self-assigned this Mar 26, 2024
@pravesh-sharma pravesh-sharma moved this from 🆕 New to 🏗 In Progress in Current Sprint (183) Mar 26, 2024
pravesh-sharma added a commit to pravesh-sharma/pgadmin4 that referenced this issue Mar 28, 2024
pravesh-sharma added a commit to pravesh-sharma/pgadmin4 that referenced this issue Mar 28, 2024
@pravesh-sharma pravesh-sharma moved this from 🏗 In Progress to In Review in Current Sprint (183) Mar 28, 2024
akshay-joshi pushed a commit that referenced this issue Apr 4, 2024
@akshay-joshi akshay-joshi added this to the 8.6 milestone Apr 4, 2024
@akshay-joshi akshay-joshi moved this from In Review to In Testing in Current Sprint (183) Apr 4, 2024
@yogeshmahajan-1903 yogeshmahajan-1903 self-assigned this Apr 11, 2024
@yogeshmahajan-1903
Copy link
Contributor

Working fine.

@yogeshmahajan-1903 yogeshmahajan-1903 moved this from In Testing to ✅ Done in Current Sprint (183) Apr 11, 2024
pravesh-sharma added a commit to pravesh-sharma/pgadmin4 that referenced this issue Apr 16, 2024
… in double quotes if written in upper case. pgadmin-org#7222 "

This reverts commit fc4b419.
@pravesh-sharma
Copy link
Contributor

This has been the by-design behaviour of pgAdmin. Using GUI intentionally handles quoting for the user.

@pravesh-sharma pravesh-sharma closed this as not planned Won't fix, can't repro, duplicate, stale Apr 16, 2024
akshay-joshi pushed a commit that referenced this issue Apr 17, 2024
… in double quotes if written in upper case. #7222"

This reverts commit fc4b419.
@akshay-joshi akshay-joshi removed this from the 8.6 milestone Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants