8000 Failed when using different schema on postgresql · Issue #273 · boramalper/magnetico · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Jan 21, 2022. It is now read-only.
This repository was archived by the owner on Jan 21, 2022. It is now read-only.
Failed when using different schema on postgresql #273
Open
@kehboard

Description

@kehboard

When I set schema in connection URI, program crashed.
~/go/bin/magneticod --database=postgres://user:pass@127.0.0.1/magneticod\?sslmode\=disable\&schema\=magneticod -v 2021-05-08T17:56:07.029+0300 INFO magneticod v0.12.0 has been started. 2021-05-08T17:56:07.030+0300 INFO Copyright (C) 2017-2020 Mert Bora ALPER <bora@boramalper.org>. 2021-05-08T17:56:07.030+0300 INFO Dedicated to Cemile Binay, in whose hands I thrived. 2021-05-08T17:56:07.030+0300 INFO Compiled on 2021-05-08T14:52:25Z 2021-05-08T17:56:07.040+0300 FATAL Could not open the database {"url": "postgres://user:pass@127.0.0.1/magnet?sslmode=disable&schema=magnet", "error": "sql.DB.Ping: failed to connect to host=127.0.0.1 user=magnetico database=magnet: server error (FATAL: unrecognized configuration parameter \"schema\" (SQLSTATE 42704))", "errorVerbose": "failed to connect to host=127.0.0.1 user=magnetico database=magnet: server error (FATAL: unrecognized configuration parameter \"schema\" (SQLSTATE 42704))\nsql.DB.Ping\ngithub.com/boramalper/magnetico/pkg/persistence.makePostgresDatabase\n\t/home/user/magnetico-0.12.0/pkg/persistence/postgres.go:45\ngithub.com/boramalper/magnetico/pkg/persistence.MakeDatabase\n\t/home/user/magnetico-0.12.0/pkg/persistence/interface.go:120\nmain.main\n\t/home/user/magnetico-0.12.0/cmd/magneticod/main.go:95\nruntime.main\n\t/usr/lib/go-1.16/src/runtime/proc.go:225\nruntime.goexit\n\t/usr/lib/go-1.16/src/runtime/asm_amd64.s:1371"}
If I remove parameter schema from connection URI it creates schema "magneticod" but that scheme empty and all data saved in "public" scheme.
all schemas in db
empty schema magneticod
public scheme

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0