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

Missing postgres user #387

Open
dvdplm opened this issue Nov 9, 2021 · 1 comment
Open

Missing postgres user #387

dvdplm opened this issue Nov 9, 2021 · 1 comment

Comments

@dvdplm
Copy link
Contributor

dvdplm commented Nov 9, 2021

Out put when running TEST_DATABASE_URL="postgres://localhost:5432/archive" cargo test:

error: error returned from database: role "postgres" does not exist
  --> /Users/aggron/dev/work/substrate-archive/substrate-archive/src/database/queries.rs:65:5
   |
65 |       Ok(sqlx::query_as!(
   |  ________^
66 | |         Series,
67 | |         "
68 | |         SELECT missing_num
...  |
76 | |         max_block_load
77 | |     )
   | |_____^
   |
   = note: this error originates in the macro `$crate::sqlx_macros::expand_query` (in Nightly builds, run with -Z macro-backtrace for more info)

I guess this means I need a postgres user?

@dvdplm
Copy link
Contributor Author

dvdplm commented Nov 9, 2021

Running createuser -s postgres fixes this (on macos not all postgres installations come with a "standard" setup script). Worth adding to the docs.

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

No branches or pull requests

1 participant