Closed ghost closed 3 years ago
Hey @joerghenkebuero, thanks for the detailed report and proposed solutions! It looks like you can currently use:
DBI::SQL("myschema.mytable")
DBI::Id(schema="myschema", table="mytable")
I added some tests and will add a section to the readme as well.
Thank you very much, this was really helpful and did solve my problems completely. Therefore, I close this issue.
The Problem
If I use multiple schemata in postgreSQL,
dbxInsert
does not work properly when using the schema names for the table name.Versions
Analysis
Using quoted table names leads to an error in postgreSQL if you need to specify a schema. As
dbxInsert
does not have a parameter for the schema, one can only try to abuse the table parameter for that. But when the table name is quoted by the sql tool (maybe inherited by dbx), postgreSQL does not find that as it interprets this as a full table name instead of a combined schema + table name.Solution proposal
schema
todbxInsert
, defaulted to NAExample to reproduce the failure
setup the database
reproduce the error message in psql
the correction in psql
setup R
the error message in R