Search Postgresql Archives

Re: Need Assistance: Command to display procedures does not work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Adria/Rob,

Please note, 'shc' schema was part of a different machine/host. For now, I see issue on another host machine which i connect using psql and PgAdmin4 and get different result on both and we have only public schema here on this machine

shc_data=> SELECT proname AS function_name,proacl AS privileges FROM pg_proc WHERE proname in ('sql_insert_data_procedure','sql_select_data_procedure','sql_select_size_procedure','sql_update_data_procedure');
       function_name       | privileges
---------------------------+------------
 sql_select_size_procedure |
 sql_select_data_procedure |
 sql_insert_data_procedure |
 sql_update_data_procedure |
(4 rows)

shc_data=> DROP PROCEDURE sql_insert_data_procedure;
ERROR:  could not find a procedure named "sql_insert_data_procedure"
shc_data=> SHOW search_path
shc_data->
shc_data-> ^C
shc_data=> SHOW search_path;
   search_path
-----------------
 "$user", public
(1 row)

shc_data=>

Regards,
Sasmit Utkarsh
+91-7674022625


On Wed, Feb 28, 2024 at 10:43 PM Adrian Klaver <adrian.klaver@xxxxxxxxxxx> wrote:
On 2/28/24 09:08, Sasmit Utkarsh wrote:
> Thanks Rob
>
> So which one could I rely on for better information? probably, results
> shown by PgAdmin4 right? As  I get the below when I try to drop
> procedure through psql cmd and i see the procedure getting fetched from
> the query
>
> shc_data=> SELECT proname AS function_name,proacl AS privileges FROM
> pg_proc WHERE proname in
> ('sql_insert_data_procedure','sql_select_data_procedure','sql_select_size_procedure','sql_update_data_procedure');
>         function_name       | privileges
> ---------------------------+------------
>   sql_select_size_procedure |
>   sql_select_data_procedure |
> *sql_insert_data_procedure* |
>   sql_update_data_procedure |
> (4 rows)
>
> shc_data=> DROP PROCEDURE *sql_insert_data_procedure*;
> ERROR:  could not find a procedure named "sql_insert_data_procedure"
> shc_data=>

We've been down this road before, it is a search_path issue.

In psql do:

SHOW search_path;

then do:

\df *.sql_insert_data_procedure

Then see if the schema shown in the second command is in the search_path
returned by the first command.

>
> Regards,
> Sasmit Utkarsh
> +91-7674022625
>


--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux