From: Bruno Wolff III <bruno@wolff.to>
To: David B <postgresql@thegatelys.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: How to figure out when was a table created
Date: Fri, 3 Oct 2003 06:54:05 -0500
Message-ID: <20031003115405.GA3039@wolff.to> (raw)
In-Reply-To: <GOEGKICPFOPNLIEIHGFJEEJOCBAA.postgresql@thegatelys.com>
References: <GOEGKICPFOPNLIEIHGFJIEHJCBAA.postgresql@thegatelys.com>
<GOEGKICPFOPNLIEIHGFJEEJOCBAA.postgresql@thegatelys.com>
On Thu, Oct 02, 2003 at 16:01:16 -0700,
David B <postgresql@thegatelys.com> wrote:
> Hi folks,
>
> I posted this question a few days ago and got no response so I guess it
> cannot be done (surprising!)
> So that leaves me with my business problem.
>
> We create a table for each days activity.
> After N days (typically 7 days) we can drop the table.
> The table name is not known so cannot force business to make tablename
> something like mydata_MMDDYY
>
> I'd like to be able to do something like:
> SELECT tablename
> FROM pg_???
> WHERE to_char( ???, 'dd/mm/yy' ) = to_char( now() - interval '7 days',
> 'dd/mm/yy' )
>
> Any suggestions?
You could consider changing the way you do things. You might be able to
accomplish your goal by keeping the data in one table and keeping
partial indexes on the table corresponding to the last seven days.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: bruno@wolff.to, postgresql@thegatelys.com
Subject: Re: How to figure out when was a table created
In-Reply-To: <20031003115405.GA3039@wolff.to>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox