On Mon, 24 Jan 2005 08:28:09 -0700, "Jonah H. Harris" <jharris@tvi.edu>
wrote:
> UPDATE pg_user_table_counts
> SET rowcount = rowcount + 1
> WHERE schemaname = this_schemaname
> AND tablename = TG_RELNAME;
This might work for small single user applications. You'll have to keep
an eye on dead tuples in pg_user_table_counts though.
But as soon as there are several concurrent transactions doing both
INSERTs and DELETEs, your solution will in the best case serialise
access to test_tbl or it will break down because of deadlocks.
ServusManfred