Skip to content

schema config parameter has no effect with pg driver (postgres) #459

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
stefaneg opened this issue Jan 23, 2017 · 8 comments
Open

schema config parameter has no effect with pg driver (postgres) #459

stefaneg opened this issue Jan 23, 2017 · 8 comments
Labels

Comments

@stefaneg
Copy link

stefaneg commented Jan 23, 2017

I trying to get db-migrate to create the migration table in a schema of my choosing, to no avail. After a brief look through the code, it seems to me that the schema attribute in database.json is never used. If I understand the code correctly, the config object is passed directly to the node-postgres driver, which does nothing with the schema attribute.

This issue here is possibly relevant, it basically states that schema specification through config is not supported.

brianc/node-postgres#1123

Am I missing something?


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@pedro-ribeiro
Copy link

Same problem here.

@wzrdtales wzrdtales added the bug label Apr 9, 2017
@wzrdtales
Copy link
Member

@pedro-ribeiro @stefaneg Ok, seems like this needs a bit of hoop jumping to make it work with pg. Thanks for reporting!

@LiamKarlMitchell
Copy link

LiamKarlMitchell commented Nov 3, 2017

Could we have a post connect query executed for set options?

Other database/scenarios may also benefit from running some set options to configure the session some way before any other sql commands are executed.
(ANSI NULLS SQL server etc if someone ever made a connector for that)

Example:

-- on connect
set search_path = <schema>, public;

Providing the user/role has the appropriate grants on that schema?

Note: Ended up just making multiple users with different configured search paths to work around this.

@oaltman
Copy link

oaltman commented Apr 4, 2018

any update on this?

@Koofii
Copy link

Koofii commented Nov 14, 2018

Any update on this?

@davetheninja
Copy link

All can someone confirm if this was ever fixed?

I am using the latest beta and am getting the same issue.

If it has been fixed and it’s now a regression can someone tell me which version to roll back to please.

@kylecombes
Copy link

I'm still seeing this problem.

@nstylo
Copy link

nstylo commented Dec 21, 2023

Still seeing this issue. Not sure if this ever will be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants