I need to set schema path in Postgres so that I don’t every time specify schema dot table e.g. schema2.table.
Set schema path:
SET SCHEMA PATH a,b,c
only seems to work for one query session on mac, after I close query window the path variable sets itself back to default.
How can I make it permanent?
(And if you have no admin access to the server)
Two important things to know about:
a, b, cmatters, as it is also the order in which the schemas will be looked up for tables. So if you have the same table name in more than one schema among the defaults, there will be no ambiguity, the server will always use the table from the first schema you specified for yoursearch_path.