Open dimsmol opened 7 years ago
Sounds reasonable to me. You can implement your own connect function via the Internal
module, but perhaps it would be better to have a way to do this via the public API? I don't know.
Well, even if we don't offer a way to do this via the public interface, we should ensure that there is a semi-standard and reasonably convenient way to implement this function using an Internal module
connectPostgreSQL executes several
SET
commands automatically right after connecting to database:This prevents using
postgresql-simple
for databases that support PostgreSQL protocol, but don't implement all of its features. For instance, connection to cockroachdb fails because it doesn't implementSET datestyle TO ISO
.It would be nice to have an option to omit these
SET
commands on connection creation.