0

I've created some functions in a specific schema, but the "Functions" section has nothing inside..

I create functions like this example:

CREATE FUNCTION pymax (a integer, b integer)
  RETURNS integer
AS $$
  if a > b:
  return a
return b
$$ LANGUAGE plpythonu;
2
  • Can you show us the code used for the function creation ? Commented Apr 5, 2013 at 15:35
  • the "Functions" section where? In pgAdmin? Commented Apr 5, 2013 at 18:21

1 Answer 1

1

If the name is not schema-qualified, a function (like other objects) is created in your current schema. Your current schema is defined by the current setting of search_path.

To see your current search_path:

SHOW search_path;

There are a number of ways to set the search_path, more in this related answer:
How does the search_path influence identifier resolution and the "current schema"

To find out whether any function with a similar name exists in your database:

SELECT n.nspname, p.proname, pg_get_function_arguments(p.oid) As args
FROM   pg_proc p
JOIN   pg_namespace n ON n.oid = p.pronamespace
WHERE  p.proname ILIKE '%pymax%';

If that doesn't find anything, the functions doesn't exist in this database. Maybe you created it in another db by mistake?

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, I've edited answer to search in namespace. (I don't know functions name =D)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.