Skip to content
Advertisement

Prisma PostgreSQL queryRaw error code 42P01 table does not exist

I am trying to run a query that searches items in the Item table by how similar their title and description are to a value, the query is the following:

However when the code is run I receive the following error:

I have run also the following query:

Which correctly shows that the Item table exists! Where is the error?

Advertisement

Answer

After doing some light research, It looks like you possibly need double-quotes. Try

I say this because PostgreSQL tables names and columns default to lowercase when not double-quoted. If you haven’t built much of your db, it may be worth wild to make all the tables and columns lowercase so that you won’t have to keep adding double quotes and escaping characters.

References:

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement