Re: How to figure out when was a table created

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: How to figure out when was a table created
Дата
Msg-id 20031003115405.GA3039@wolff.to
обсуждение исходный текст
Ответ на How to figure out when was a table created  ("David B" <postgresql@thegatelys.com>)
Список pgsql-sql
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.


В списке pgsql-sql по дате отправления:

Предыдущее
От: achill@matrix.gatewaynet.com
Дата:
Сообщение: Re: How to figure out when was a table created
Следующее
От: achill@matrix.gatewaynet.com
Дата:
Сообщение: HeapTuple->t_tableOid==0 after SPI_exec