siq_query(...)
is a server-side function taking 7 input parameters (or more). It's not part of any standard Postgres distribution I know (certainly not mainline Postgres 9.2), so it has to be user-defined or part of some extension you installed. It does whatever is defined in the function. This can include basically anything your Postgres user is allowed to do. Unless it's a SECURITY DEFINER
function, then it ca do whatever the owner of the function is allowed to do.
The way it is called (SELECT * FROM
), only makes sense if it returns multiple rows and/or columns, most likely a set of rows, making it a "set-returning function", which can be used almost like a table in SQL queries.
Since the function name is not schema-qualified, it has to reside in a visible schema. See:
Long story short, you need to see the function definition to know what it does exactly. You can use psql (\df+ siq_query
), pgAdmin (browse and select it to see its definition in the SQL pane) or any other client tool to look it up. Or query the system catalog pg_proc
directly:
SELECT * FROM pg_proc WHERE proname = 'siq_query';
Pay special attention to the column prosrc
, which holds the function body for some languages like plpgsql.
There might be multiple variants of that name, Postgres allows function overloading.