Thread: Superuser can execute but not view function

Superuser can execute but not view function

From
"Mike G."
Date:
Hi,

I have a function that exists (I can call it and execute it) but does not appear in pgadmin.  I issued an Alter
functionowner to postgres (the super user) which was successful to check if it was a permission problem, refreshed
pgadminand it still does appear. 

I then issued a select * from pg_proc and the function does not appear in this table.  Should it not be listed in this
table?

The function is named surveys_2004.update_total_sent_by_consultant_table(date,date)

This database started out in 7.3 under cygwin and is now 8.03 under windows natively.

I would like to access the function above and modify it.

Ideas on how I can get it to appear in pgadmin or how I could use psql to dump the function definition?

Mike


----- End forwarded message -----

Re: Superuser can execute but not view function

From
Michael Fuhr
Date:
On Thu, Aug 25, 2005 at 03:11:03PM -0500, Mike G. wrote:
>
> I have a function that exists (I can call it and execute it) but does
> not appear in pgadmin.  I issued an Alter function owner to postgres
> (the super user) which was successful to check if it was a permission
> problem, refreshed pgadmin and it still does appear.
>
> I then issued a select * from pg_proc and the function does not appear
> in this table.  Should it not be listed in this table?
>
> The function is named surveys_2004.update_total_sent_by_consultant_table(date,date)

If the function exists then it should be in pg_proc.  Could there
be a case issue (uppercase vs. lowercase)?  What's the output of
the following query?

SELECT n.nspname, p.proname, p.proargtypes
FROM pg_proc AS p
LEFT OUTER JOIN pg_namespace AS n ON n.oid = p.pronamespace
WHERE p.proname ILIKE '%update_total_sent_by_consultant_table%';

If the above query returns nothing then please copy-and-paste a
query showing exactly how you call the function and the output that
shows that it exists.

--
Michael Fuhr