Re: View of Union Multiple Tables - Only If table EXISTS - Mailing list pgsql-general

From David G. Johnston
Subject Re: View of Union Multiple Tables - Only If table EXISTS
Date
Msg-id CAKFQuwb4AbS7a8wXQY4u4kmbT5p5G5rozTWhydHNq2qjD5U+Rw@mail.gmail.com
Whole thread Raw
In response to View of Union Multiple Tables - Only If table EXISTS  (Avi Weinberg <AviW@gilat.com>)
List pgsql-general
On Sunday, July 25, 2021, Avi Weinberg <AviW@gilat.com> wrote:


Is it possible to write the view syntax once and it will do some type of SELECT IF EXISTS.

 


Not with a virew.  Dynamic SQL in a function can be used to build a query at runtime that includes only tables that exist.

David J. 

pgsql-general by date:

Previous
From: Avi Weinberg
Date:
Subject: View of Union Multiple Tables - Only If table EXISTS
Next
From: Vijaykumar Jain
Date:
Subject: Re: regarding sql password auth