Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In this SO question about stored procedures in plpgsql, the stored procedure look like I don't know what is the meaning of the prefix sth.

For example:

create or replace function something.function_name()
returns setof record as
-- code
$$ language plpgsql;

Looking in this book in the "Part IV: Programming with PostgreSQL" I have found no mention of this type of creation declaration with a function name in two parts.

In the postgresql documentation, at the create function section, the only similar thing is when they deal about argtype or regtype than could be written in the form: table_name.column_name%TYPE. But it's not related to the name of the function.

So, what is this syntax related to ?

share|improve this question
up vote 1 down vote accepted

It's the name of a schema.
In other words, a schema-qualified function name. Just like you can schema-qualify tables or views or types or even operators (you just don't have to, normally).

Also learn about the schema search_path.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.