synth icon indicating copy to clipboard operation
synth copied to clipboard

Postgres connection options

Open probablykabari opened this issue 2 years ago • 1 comments

Connection string options don't work when using the --to parameter.

For example, this is a valid connection string per the the postgres documentation but results in an error:

synth generate synth-data --to 'postgres://postgres:pass@localhost:5432/mydb?options=-c%20search_path%3Dapp_public'

[2022-06-22T16:23:30Z WARN  sqlx_core::postgres::options::parse] 
      ignoring unrecognized connect parameter: options=-c'search_path=app_public'

I think this may really be an issue with the sqlx library but I am not totally sure.

Optional Resolution

My real issue is that without this connection string there doesn't seem to be a way to generate data into a postgres schema, so if there is another way to accomplish this the issue would be resolved.

probablykabari avatar Jun 22 '22 16:06 probablykabari

Correction, I didn't notice the --schema option in the generate command so my particular problem with schema inserts is resolved. However the connection string error is still a bug IMO.

probablykabari avatar Jun 29 '22 17:06 probablykabari