Re: sql and timestamp variable

From: Richard Huxton <dev(at)archonet(dot)com>
To: "Johnson, Shaunn" <SJohnson6(at)bcbsm(dot)com>, "pg-general (E-mail)" <pgsql-general(at)postgresql(dot)org>
Subject: Re: sql and timestamp variable
Date: 2003-05-15 15:54:49
Message-ID: 200305151654.49731.dev@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message scott.marlowe 2003-05-15 16:08:32 Re: ERROR: Memory exhausted in AllocSetAlloc(188)
Previous Message Richard Huxton 2003-05-15 15:51:37 Re: How do I view the logs?