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
solarsail <[EMAIL PROTECTED]> writes:
> 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 ) m
The current behavior is by design.
We use the table as a logging repository. It can get very large
250 000 records. Because of the large number of records that we
have in the table we found it was much faster to perform inserts on a
smaller table. Our current system rolls the tables over
every
The current behavior is by design.
We use the table as a logging repository. It can get very large 250 000
records. Because of the large number of records that we have in the table we
found it was much faster to perform inserts on a smaller table. Our current
system rolls the tables over every 12
<[EMAIL PROTECTED]>
To: Tom Lane <[EMAIL PROTECTED]>
Cc: pgsql-sql@postgresql.org
Sent: Tue, 4 Oct 2005 14:40:54 -0400
Subject: Re: [SQL] using pg_tables and tablename in queries
> The current behavior is by design.
>
> We use the table as a logging repository. It can g
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
Yasir --
You wrote:
>If I generate a temporary table instead of returning the results how
>long will that table exist for? Excuse the OOP terminology but would
>it be correct to create a 'Singleton' to access the temporary table,
>where if it exists and is less than 30 minutes old use that one,
ct: Re: [SQL] using pg_tables and tablename in queries
> 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 t
"Tom Lane" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> solarsail <[EMAIL PROTECTED]> writes:
>> 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, howeve
Thanks for the help everyone. I got everything working.
The query I was orignally looking for was something like this:
SELECT * from mytable WHERE pg_tables.tablename IN
( select tablename from pg_tables where tablename like 'mytable
_%' )
It turns out that isn't what I really
10 matches
Mail list logo