running a query on a list of tables - Mailing list pgsql-novice

From Mark King
Subject running a query on a list of tables
Date
Msg-id CAP2CKMkzcwW-3MfSB0716DBnZUYQjMdBQhFidXNCapa7iXJ_Rg@mail.gmail.com
Whole thread Raw
Responses Re: running a query on a list of tables  (David Rowley <david.rowley@2ndquadrant.com>)
List pgsql-novice
I am trying to figure out how to run a query on a list of tables or views in this case.
I can run :

I can run :

SELECT * FROM tablelist;

which returns a list of tables

names
----------------
mortgage
creditcard
auto
........continued


I want to run :

SELECT * FROM (SELECT * FROM tablelist);


all tables have the same columns and types.

any idea how to make this work? tablelist contains a large number of tables that will change over time and I do not want to manually write a bunch of unions.

any suggestions?

Thank you

 

pgsql-novice by date:

Previous
From: Ozan Kahramanogullari
Date:
Subject: Re: psql on Mac
Next
From: David Rowley
Date:
Subject: Re: running a query on a list of tables