Re: [SQL] Truncate table at a certain size.

2008-04-28 Thread Scott Marlowe
On Mon, Apr 28, 2008 at 7:24 PM, Gurjeet Singh <[EMAIL PROTECTED]> wrote: > On Tue, Apr 29, 2008 at 4:05 AM, Dana Huggard - Navarik > <[EMAIL PROTECTED]> wrote: > > > Hello, > > > > What would be the best method to truncate a table once it reaches a > > certain size. > > > > For instance, a table n

Re: [SQL] Truncate table at a certain size.

2008-04-28 Thread Gurjeet Singh
On Tue, Apr 29, 2008 at 4:05 AM, Dana Huggard - Navarik < [EMAIL PROTECTED]> wrote: > Hello, > > What would be the best method to truncate a table once it reaches a > certain size. > > For instance, a table named log. I can check the size of the log; > > db=# select pg_relation_size('log'); >

[SQL] Truncate table at a certain size.

2008-04-28 Thread Dana Huggard - Navarik
Hello, What would be the best method to truncate a table once it reaches a certain size. For instance, a table named log. I can check the size of the log; db=# select pg_relation_size('log'); pg_relation_size -- 8192 (1 row) What I would like t