TablePlus-Windows icon indicating copy to clipboard operation
TablePlus-Windows copied to clipboard

Existing PostgreSQL function not visible in TablePlus

Open ReyerSneller opened this issue 10 months ago • 13 comments

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

Image

ReyerSneller avatar Apr 20 '25 07:04 ReyerSneller

Hi @ReyerSneller, have you tried refreshing the workspace using the Ctrl + R shortcut? What version of PostgreSQL are you currently using?

sonswift avatar Apr 20 '25 07:04 sonswift

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

ReyerSneller avatar Apr 20 '25 07:04 ReyerSneller

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';

sonswift avatar Apr 20 '25 07:04 sonswift

Thanks. This is the result:

Image

ReyerSneller avatar Apr 20 '25 07:04 ReyerSneller

Additional information: with PGAdmin I can access the function.

ReyerSneller avatar Apr 20 '25 08:04 ReyerSneller

Hi @ReyerSneller, could you please take a screenshot of this information in the status bar for me?

Image

sonswift avatar Apr 20 '25 08:04 sonswift

Sorry, for this question, but where do I find the status bar?

ReyerSneller avatar Apr 20 '25 15:04 ReyerSneller

Found it:

Image

ReyerSneller avatar Apr 20 '25 23:04 ReyerSneller

Hi @ReyerSneller, could you please check if your current schema matches the public schema where the function is defined?

Image

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!

sonswift avatar Apr 21 '25 03:04 sonswift

Image

I greatly appreciate your willingness to help me Here is the current schema. Does that help?

ReyerSneller avatar Apr 21 '25 07:04 ReyerSneller

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.

Image

sonswift avatar Apr 21 '25 07:04 sonswift

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

ReyerSneller avatar Apr 21 '25 08:04 ReyerSneller

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!

sonswift avatar Apr 21 '25 08:04 sonswift