Existing PostgreSQL function not visible in TablePlus
Hi,
I'm using TablePlus version 6.4.8 (310). I developed a small function and I'm using it in a query. The function works without any problem, HJowever I cannot access the function anymore to edit it. When I click Functions nothing happens. Can anybody help me?
Reyer
Hi @ReyerSneller, have you tried refreshing the workspace using the Ctrl + R shortcut? What version of PostgreSQL are you currently using?
Yes I tried a refresh but that didn't help. The version is PostgreSQL 12.15 (Ubuntu 12.15-0ubuntu0.20.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0, 64-bit
Hi @ReyerSneller, could you help me run the query below in the SQL Editor of TablePlus? This query retrieves the list of functions in your database. If any errors occur, please send me a screenshot.
SELECT
pg_catalog.pg_get_userbyid (p.proowner) as owner,
p.oid AS oid,
pg_get_function_identity_arguments(p.oid) AS args,
n.nspname AS function_schema,
p.proname AS function_name,
CASE
WHEN p.prokind = 'a' THEN 'aggregate'
WHEN p.prokind = 'w' THEN 'window'
WHEN p.prokind = 'p' THEN 'procedure'
ELSE 'function'
END AS function_type
FROM
pg_catalog.pg_proc p
LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace
WHERE
n.nspname <> 'pg_catalog'
AND n.nspname <> 'information_schema';
Thanks. This is the result:
Additional information: with PGAdmin I can access the function.
Hi @ReyerSneller, could you please take a screenshot of this information in the status bar for me?
Sorry, for this question, but where do I find the status bar?
Found it:
Hi @ReyerSneller, could you please check if your current schema matches the public schema where the function is defined?
At the moment, I haven’t been able to identify the exact cause of the issue, but I’m continuing to investigate it. I’ll let you know as soon as there’s an update. I’m sorry for the inconvenience.
Also, if you encounter any other issues while using the app, feel free to reach out — I’m here to help. Thank you!
I greatly appreciate your willingness to help me Here is the current schema. Does that help?
Oh, your current schema is information_schema, but the function you created is in the public schema. Please click and switch to the public schema — you will then see your function listed under the Functions section.
Hi @sonswift
Yes, it works. I am so sorry! It just goes to show again that I have too little knowledge. My apologies for taking up your time. Thank you very much for your help!!!
Have a nice day Reyer
Hi @ReyerSneller,
No worries at all — I’m really glad to hear it’s working now! 😊 Please don’t hesitate to reach out if you run into any other issues or have questions in the future. I’m always happy to help.
Wishing you a great day too!