query tables based on a query - Mailing list pgsql-sql

From solarsail
Subject query tables based on a query
Date
Msg-id aa44f4a30509301547g69dfffcayfe2e967925657822@mail.gmail.com
Whole thread Raw
Responses Re: query tables based on a query  (Bruno Wolff III <bruno@wolff.to>)
List pgsql-sql
I have a large number of tables with a common naming convention<br /><br /> basically:<br /><br />       table001,
table002,table003 ... table00n<br /><br /><br /> I would like to do a query across all of the tables, however I do not
knowall of the tables before hand, and I do not want to manually generate a query like<br /><br />      select * from
table001,table002, table003<br /><br /><br /> I have a query that returns the names of the tables I want to query, it
isbasically like this:<br /><br />    select tablename from pg_tables where tablename like 'table%'<br /><br /><br />
Howdo I do this?  I've tried creating a Table Function that returns the above set and tried to use that in a select
clause,but I cant get it to work either.<br /><br /><br /> Thanks for the help<br /><br /> 

pgsql-sql by date:

Previous
From: Cenk KIZILDAG
Date:
Subject: Getting user created tables from SQL
Next
From: brett
Date:
Subject: BirthDay SQL Issue