You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using function -> CREATE Script action, the source code show in the window is different if the function is opened with another Database Editor. For example in the beginning of the function after language 'plpgsql' statement there is this:
COST 100
VOLATILE PARALLEL UNSAFE
AS $BODY$
instead it should have
AS $function$
and at the bottom of the function pgAdmin returns:
$BODY$;
ALTER FUNCTION REDACTED_SCHEMA.REDACTED_FUNCTION(character varying)
OWNER TO REDACTED_DB_USER;
GRANT EXECUTE ON FUNCTION REDACTED_SCHEMA.REDACTED_FUNCTION(character varying) TO "REDACTED_USER";
GRANT EXECUTE ON FUNCTION REDACTED_SCHEMA.REDACTED_FUNCTION(character varying) TO PUBLIC;
GRANT EXECUTE ON FUNCTION REDACTED_SCHEMA.REDACTED_FUNCTION(character varying) TO REDACTED_DB_USER;
while both the query and other db editors return:
$function$;
this is shown also if using the following query to retrieve function code from catalog tables:
SELECT n.nspname AS schema_name,
p.proname AS function_name,
pg_get_functiondef(p.oid) AS function_definition
FROM pg_proc p
JOIN pg_namespace n ON p.pronamespace = n.oid
WHERE n.nspname NOT IN ('pg_catalog', 'information_schema')
and n.nspname = 'REDACTED_SCHEMA_NAME'
and p.proname = 'REDACTED_FUNCTION_NAME';
To Reproduce
Choose a Function under any schema open it and compare the source code with the one returned by the query listed above
Expected behavior
The code should be the same if browse from different editors, but most importantly it should be the same if retrieved using queries which should have the actual code stored on the server instead of a coded version by pgadmin editor
Error message
No errors are shown
Screenshots
Can't add screenshots of actual code
Desktop (please complete the following information):
OS: Windows 11, 23H2
Mode: Desktop
Package type: ?
PgAdmin version: 8.14
Additional context
None
The text was updated successfully, but these errors were encountered:
Describe the bug
When using function -> CREATE Script action, the source code show in the window is different if the function is opened with another Database Editor. For example in the beginning of the function after
language 'plpgsql'
statement there is this:instead it should have
AS $function$
and at the bottom of the function pgAdmin returns:
while both the query and other db editors return:
$function$;
this is shown also if using the following query to retrieve function code from catalog tables:
To Reproduce
Choose a Function under any schema open it and compare the source code with the one returned by the query listed above
Expected behavior
The code should be the same if browse from different editors, but most importantly it should be the same if retrieved using queries which should have the actual code stored on the server instead of a coded version by pgadmin editor
Error message
No errors are shown
Screenshots
Can't add screenshots of actual code
Desktop (please complete the following information):
Additional context
None
The text was updated successfully, but these errors were encountered: