Auth0 Home Blog Docs

How do I use case-sensitive table names with PostgreSQL in custom database scripts?



I have a table called Users (with an uppercase U) and I have the following query in one of my custom DB scripts:

var query = 'INSERT INTO Users (email, password) VALUES ($1, $2)';

However, I’m getting an error saying that a “users” table is not available. Are the queries case-insensitive?


The PostgreSQL library used by Auth0 custom database scripts is pg. In pg, if there are any names that should be case-sensitive, they should be enclosed with double quotes.


var query = 'INSERT INTO "Users" (email, password) VALUES ($1, $2)';