Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ltree extension requirement #2017

Merged
merged 1 commit into from
May 18, 2024
Merged

Add ltree extension requirement #2017

merged 1 commit into from
May 18, 2024

Conversation

mitar
Copy link
Contributor

@mitar mitar commented May 18, 2024

Otherwise tests fail for me locally.

They still fail for me with:

--- FAIL: TestConnCopyWithAllQueryExecModes (0.13s)
    --- FAIL: TestConnCopyWithAllQueryExecModes/exec (0.02s)
        copy_from_test.go:70: Input rows and output rows do not equal: [[0 1 2 abc 2010-02-03 04:05:06 +0100 CET] [<nil> <nil> <nil> <nil> <nil>]] -> [[0 1 2 abc 2010-02-03 03:05:06 +0000 +0000] [<nil> <nil> <nil> <nil> <nil>]]
    --- FAIL: TestConnCopyWithAllQueryExecModes/simple_protocol (0.03s)
        copy_from_test.go:70: Input rows and output rows do not equal: [[0 1 2 abc 2010-02-03 04:05:06 +0100 CET] [<nil> <nil> <nil> <nil> <nil>]] -> [[0 1 2 abc 2010-02-03 03:05:06 +0000 +0000] [<nil> <nil> <nil> <nil> <nil>]]
FAIL
FAIL	github.com/jackc/pgx/v5	30.333s

But I do not know how to fix that. It might be something wrong with my local setup.

I run tests with:

$ docker run --name pgsql --rm -d -p 5432:5432 -e LOG_TO_STDOUT=1 -e PGSQL_ROLE_1_USERNAME=test -e PGSQL_ROLE_1_PASSWORD=test -e PGSQL_DB_1_NAME=test -e PGSQL_DB_1_OWNER=test registry.gitlab.com/tozd/docker/postgresql:16
$ docker exec -t -i pgsql bash
$ psql -h localhost -U test -W
test (password)
create extension hstore;
create extension ltree;
create domain uint64 as numeric(20,0);
^d
$ export PGX_TEST_DATABASE=postgres://test:test@localhost:5432/test
$ go test ./...

@jackc jackc merged commit e1b90cf into jackc:master May 18, 2024
14 checks passed
@jackc
Copy link
Owner

jackc commented May 18, 2024

You're right. The ltree requirement was added to the postgresql_setup.sql script, but it wasn't added to the docs for setting up the database manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants