You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently pgtyped is using the connection default search path which means you need to pretty much have your schema defined in public otherwise it wont work.
We run a multi-tenanted platform and use postgres schema's to silo customers data effectively which means pgtyped cannot load the type information unless we load the schema into public which would potentially expose some leakage of data if a schema wasn't provided on a query.
Take a query such as this:
select * from users where id = :user_id
Without search path support we must write the query like
select * from <schema>.users where id = :user_id
During runtime its preferable to have queries be generic and the search path set exclusively to a single schema:
set search_path = <schema>;
select * from users where id = :user_id
Describe the solution you'd like
Allow one to configure the schema/search path to use to generate type data from. This allows queries to be written without schema/search path tagged to tables for code-gen but at run time each query can have it's search path set to ensure it goes to the right schema.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Currently pgtyped is using the connection default search path which means you need to pretty much have your schema defined in public otherwise it wont work.
We run a multi-tenanted platform and use postgres schema's to silo customers data effectively which means pgtyped cannot load the type information unless we load the schema into
public
which would potentially expose some leakage of data if a schema wasn't provided on a query.Take a query such as this:
Without search path support we must write the query like
During runtime its preferable to have queries be generic and the search path set exclusively to a single schema:
Describe the solution you'd like
Allow one to configure the schema/search path to use to generate type data from. This allows queries to be written without schema/search path tagged to tables for code-gen but at run time each query can have it's search path set to ensure it goes to the right schema.
The text was updated successfully, but these errors were encountered: