Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I always be prefixing the schema name before the table names in queries(PostgreSQL 14)?

I am running Postgres 14 on my Mac. I installed the app version. I am trying from both the psql window and through jdbc calls and it expects the schema name to be prefixed always.

Example: select * from public."Melting";

Thanks.

like image 770
Shankar Avatar asked Oct 17 '25 17:10

Shankar


1 Answers

That's a good habit. Always use the explicit schema names, then you don't have to rely on the current setting of search_path.

like image 129
Laurenz Albe Avatar answered Oct 20 '25 08:10

Laurenz Albe