pudo / dataset

Easy-to-use data handling for SQL data stores with support for implicit table creation, bulk loading, and transactions.
https://dataset.readthedocs.org/
MIT License
4.78k stars 298 forks source link

Postgres search_path #327

Closed kushtun closed 4 years ago

kushtun commented 4 years ago

Question -- using dataset seems to require the connect be URL-ish. Given that a lot of Pg dbs are set up not under public, usually need to specify a schema in the connect info. How do we do that with dataset? Seems like the API examples are based around querying, can one issue a general SQL statement somehow to set the schema that way as well, or is there some syntax that allows it to go in the URL?

Not seeing a way to get to non-public schemas in dataset Pg connections.

pudo commented 4 years ago

You can pass a schema argument into dataset.connect to specify the PG search path.