How to choose table in SELECT clause without schema qualifier or 'set local'

From: intmail01 <intmail01(at)gmail(dot)com>
To: pgsql-sql(at)lists(dot)postgresql(dot)org
Subject: How to choose table in SELECT clause without schema qualifier or 'set local'
Date: 2024-03-22 07:11:23
Message-ID: CAKJANSDpz7TXn30vv1HVSjRv0N+xSnyiSnfyMdFaeXh1_yfFuw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi,

My db have many schemas (company name) and there are SELECT code related to
tables that I distribute for each company users.

The structure inside are the same for all schemas.

It is a nightmare to change code each time to modify the schema qualifier
or SET LOCAL search_path when I add a new company.
Is there command, configurations or any trick to not modify code each time
I add company then code can works for any schema.

Thanks.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Jamie Thompson 2024-03-22 11:36:54 UPDATE with AND clarification
Previous Message Sheryl Prabhu David 2024-03-14 07:29:03 Re: Nested loop behaviour with pg_stat_activity