Re: [SQL] using pg_tables and tablename in queries

2005-10-07 Thread solarsail
n't what I really wanted. I now have a nice stored procedure, with a clean interface. Thanks for all the help! On 10/5/05, codeWarrior <[EMAIL PROTECTED]> wrote: > > "Tom Lane" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > solarsail <[

[SQL] query tables based on a query

2005-10-04 Thread solarsail
I have a large number of tables with a common naming convention basically:       table001, table002, table003 ... table00n I would like to do a query across all of the tables, however I do not know all of the tables before hand, and I do not want to manually generate a query like select *

Re: [SQL] using pg_tables and tablename in queries

2005-10-04 Thread solarsail
I managed to make this work as sub query before... I wish I had written it down somewhere... Regarding the creation of a function. I do have a function that almost does that. I'm having a hard time getting it to return a set of records from the EXECUTE command ( more than one row returned by the

Re: [SQL] using pg_tables and tablename in queries

2005-10-04 Thread solarsail
against my huge set of data to generate some reports.  I'm probably going to create a temporary table with a few indexes to make the reports run faster... however I need to join the tables all together first.   On 10/4/05, Tom Lane <[EMAIL PROTECTED]> wrote: solarsail <[EMAIL PROTECTE

[SQL] using pg_tables and tablename in queries

2005-10-04 Thread solarsail
I have a large number of tables with a common naming convention       mytable001, mytable002, mytable003 ... mytable00n I would like to do a query across all of the tables, however I do not know all of the tables before hand, and I do not want to ( cant ) manually generate a query like