From: | Cédric Villemain <cedric(dot)villemain(dot)debian(at)gmail(dot)com> |
---|---|
To: | Rabi Jay <rabijay1(at)yahoo(dot)com> |
Cc: | "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: Insert statement deletes older table records |
Date: | 2011-05-30 10:25:29 |
Message-ID: | BANLkTik=Jsb-4Dr2qu6tEKi89Cosh0qUMg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
2011/5/30 Rabi Jay <rabijay1(at)yahoo(dot)com>:
> Hi,
>
> When I execute an insert statement, older table records are deleted even
> though my insert statement works. It always keeps the maximum number of
> records in the table to 4200 records. So If I added 3 more records, it
> deletes the first three records in the table even though it adds the 3 new
> records.
>
> Based on my research it appears postgreql has no limit to number of records
> in a table - what should I do to avoid this behavior.
I think your can look at the PostgreSQL 9.1 (still in beta).
Cf doc for writable CTE :
http://www.postgresql.org/docs/9.1/static/queries-with.html
7.8.2. Data-Modifying Statements in WITH
And delete/insert in the same query.
Else there is no special feature to limit the number of rows in a table
>
> Thanks.
--
Cédric Villemain 2ndQuadrant
http://2ndQuadrant.fr/ PostgreSQL : Expertise, Formation et Support
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2011-05-31 03:16:53 | Re: 'SGT DETAIL: Could not open file "pg_clog/05DC": No such file or directory' - what to do now? |
Previous Message | Tomasz Chmielewski | 2011-05-30 09:18:17 | Re: 'SGT DETAIL: Could not open file "pg_clog/05DC": No such file or directory' - what to do now? |