Reyna Melara <remabarca@gmail.com> writes:
> I understand I need to be more specific, I have
> Admissions=# \dt
> Listado de relaciones
> Esquema | Nombre | Tipo | Dueño
> ---------+---------+-------+----------
> public | apply | tabla | postgres
> public | college | tabla | postgres
> public | student | tabla | postgres
> (3 filas)
> SELECT sID, sName, GPA FROM Student WHERE GPA > 3.6;
> ERROR: no existe la relación «student»
> LÍNEA 1: SELECT sID, sName, GPA FROM Student WHERE GPA > 3.6;
It's pretty hard to make those two observations match up.
The "\dt" command shows that you have a table named "student",
and that that's in the "public" schema, and that "public" is
in your search_path (else \dt wouldn't have shown it).
But then the query isn't finding the table. That certainly
seems impossible if you had issued the query through psql
in the same session where you did the "\dt", so I assume that
you are issuing the query in some other way that you're not
telling us about. It's tough to give useful advice when we're
not seeing the real picture.
> and I have read it may be because of the Schema Search Path as
> https://www.postgresql.org/docs/9.1/ddl-schemas.html documents.
Well, that's a possible answer, but "public" is in the search
path by default so I don't think it's the most likely answer.
What I think is a more likely answer is that your query is being
issued in some other database than the one you did the "\dt"
command in. Check the connection parameters for whatever you're
using to issue the query.
Also, I notice that above you are connected to a database named
"Admissions" (with a capital A). I wonder if you are managing
to confuse yourself with mixed-case names. Try "\l" in psql
and see if you also have a database named "admissions" (lower
case); if so, maybe your query is being issued in that one?
regards, tom lane