Re: Insert statement deletes older table records

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2011/5/30 Rabi Jay <rabijay1@xxxxxxxxx>:
> 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

-- 
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux