Unqualified relations in views

From: "Pete O'Such" <posuch(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Unqualified relations in views
Date: 2023-09-13 05:58:28
Message-ID: CAEdngj_Z6mQa3qvcmUm6wwg1_dMvPtSt1Tr3PpxW2WNRzQ8haw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

For a view, how does one show what schema was used to qualify a relation,
when the query used to create the view originally left the relation
unqualified?

The qualification of the view query seems static in all uses of the view.
Using pg_get_viewdef() returns the unqualified relation, but Postgres
always executes a qualified version of the view query, seemingly determined
upon creation of the view.

That implies the final qualifier is stored by Postgres, but I don't know
how to show it.

Thanks,
Pete O'Such

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Laurenz Albe 2023-09-13 06:11:03 Re: Unqualified relations in views
Previous Message Adrian Klaver 2023-09-12 14:57:33 Re: Upgrade problem