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
curl http://localhost:3000/todos returns {"hint":null,"details":null,"code":"42P01","message":"relation \"api.todos\" does not exist"} #1009
Comments
Cet the connection string from postgrest.conf, use it to connect to the db using psql then make sure you can run select * from api.todos
First thought ys that you are connecting to the wrong db or you have not actually created the table (in the correct schema)
… On 7 Nov 2017, at 19:54, amadeuspagel ***@***.***> wrote:
I followed the tutorial and
curl http://localhost:3000/todos
returns:
{"hint":null,"details":null,"code":"42P01","message":"relation \"api.todos\" does not exist"}
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I already tried that and that works, I get:
|
although it's not likely, try restarting postgrest. after that please post a copy/paste of the entire console session for the following commands
|
Restarting didn't help. I'm using c9, so I can't access postgrest.conf But here is:
|
this does not help, the point was to compare the connection string you put in postgrest.conf with the way to connect directly to the db and make sure you are not mixing things. the result of th query is irelevant |
I read "postgres.conf" thought it was something related to postgresql not postgrest. I have a tutorial.conf file: db-uri = "postgres://postgres:mysecretpassword@localhost/postgres" |
ok, so here is what i don't get. (to reiterate, IMO this is what's happening, postgrest is connecting to the database that is on the same host where it is running, i.e. c9, while you executed the sql from the tutorial using psql on your computer and not the db where postgrest is connecting) |
did you figure it out? was ti the c9 thing? |
@amadeuspagel did you make any progress with this? |
Ran into the same issue - resolved by turning off PostgresApp... Postgrest was connecting to my local Postgres rather than Docker - cheers! |
Closing due to lack of activiy, reopen if problem persists. |
Hi, I've the same issue here. Running x64 windows version. Pg is in version 10.0 webservice answer: {"hint":null,"details":null,"code":"42P01","message":"relation "pgwebtest.flattable" does not exist"} PostgREST connects successfully. My table is in the public schema of my db. Any idea ? |
@CygaLV Should be |
hi, I got same issue, here is some info
I just fllow the tutorial, no more change for config. help me pls! |
The postgrest docker container is probably connecting to your local db(on 5432 port). Specify the ports of your db in docker-compose(on port 5433 maybe) and connect postgrest to that instance. |
I solved the problem. |
This note helps people who are hitting this error `{"hint":null,"details":null,"code":"42P01","message":"relation \"api.todos\" does not exist"}` PostgREST/postgrest#1009
This note helps people who are hitting this error `{"hint":null,"details":null,"code":"42P01","message":"relation \"api.todos\" does not exist"}` PostgREST/postgrest#1009
This note helps people who are hitting this error `{"hint":null,"details":null,"code":"42P01","message":"relation \"api.todos\" does not exist"}` PostgREST/postgrest#1009
This note helps people who are hitting this error `{"hint":null,"details":null,"code":"42P01","message":"relation \"api.todos\" does not exist"}` PostgREST#1009
I followed the tutorial and
curl http://localhost:3000/todos
returns:
{"hint":null,"details":null,"code":"42P01","message":"relation \"api.todos\" does not exist"}
The text was updated successfully, but these errors were encountered: