I have a suite of identical schemas, roles/logins specific to one schema(default search_path=<role's schema>, public). Functions are public and name tables without schema, relying on caller's search_path.


On 06/07/2018 02:28 AM, [email protected] wrote:
Let's say I have following stored procedure:
|
create orreplace functionfoo()
returns table(id integer,name text)
language plpgsql
as$func$
begin
selectid,name
fromwhite_house;
end
$func$
|

The foo function is located in my_schema schema (which is different that the default one - public). The same applies to the white_house table. By adding some info (inputSchema = 'my_schema') to gradle config I generated classes from this schema and I can call the schema with:
|
Routines.foo()
|
but I'm getting error that, the table does not exists.

|
org.postgresql.util.PSQLException:ERROR:relation "white_house"does notexist
Where:PL/pgSQL functionmy_schema.foo()line 4at OPEN
|

I tried to add:
|
configuration.set(newSettings().withRenderSchema(true));
|
but it also failed.
Is there any possibility to add the "my_schema" schema prefixes at runtime to 
the tables inside this foo() function without changing the function? I'm using jOOQ 3.8.5.
--
You received this message because you are subscribed to the Google Groups "jOOQ User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "jOOQ User 
Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to