Skip to content

Cannot use \ commands #154

@sirmspencer

Description

@sirmspencer

Or at least more specifically I can do \connect my-new-db

I have a dump that looks like this.

DROP DATABASE IF EXISTS my-new-db;

CREATE DATABASE my-new-db WITH TEMPLATE = template0 ENCODING = 'UTF8' LOCALE_PROVIDER = libc LOCALE = 'en_US.UTF-8';


ALTER DATABASE my-new-db OWNER TO megamouse;

\connect my-new-db

...
more schema and tables

If I run this with a local cluster like psql -p 5433 -d postgres -f migrations/init/db-local.sql, its able to run ok. With embedded postgres I'm getting this error:

:type org.postgresql.util.PSQLException
:message ERROR: syntax error at or near "\"

Using

(-> (.getPostgresDatabase ^EmbeddedPostgres pg)
    (jdbc/execute!  ["db-local"]))

Am I doing something wrong? Possibly and enhancement needed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions