Re: sql and timestamp variable - Mailing list pgsql-general

From Richard Huxton
Subject Re: sql and timestamp variable
Date
Msg-id 200305151654.49731.dev@archonet.com
Whole thread Raw
In response to sql and timestamp variable  ("Johnson, Shaunn" <SJohnson6@bcbsm.com>)
List pgsql-general
On Thursday 15 May 2003 3:54 pm, Johnson, Shaunn wrote:
> Howdy:
>
> I have a query where I hardcode (and manually change)
> a table name that has the date as part of it's name.
>
> [snip examples]
>
> select count(*) from  db2_ps_regprof_200304 where mbr is null;

I'm not sure if this might help:

1. Create a view "db2_ps_regprof_current"
2. Make sure all your access is through that view
3. Recreate the view at every month-end (via a cron-job).

Of course, that's only useful for the specific case of "this month" and might
be fiddly if the database is in use 24/7
--
  Richard Huxton

pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: How do I view the logs?
Next
From: Tilo Schwarz (by way of Tilo Schwarz
Date:
Subject: ERROR: Memory exhausted in AllocSetAlloc(188)