Skip site navigation (1) Skip section navigation (2)

pgsql: Make pg_relation_size() and friends return NULL if the objectdo

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Make pg_relation_size() and friends return NULL if the objectdo
Date: 2012-01-19 11:18:12
Message-ID: E1Rnq0S-0002zi-R3@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Make pg_relation_size() and friends return NULL if the object doesn't exist.

That avoids errors when the functions are used in queries like "SELECT
pg_relation_size(oid) FROM pg_class", and a table is dropped concurrently.

Phil Sorber

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/fa352d662e57fa150158b9cb0a8f127250f8c97f

Modified Files
--------------
doc/src/sgml/func.sgml         |    5 ++
src/backend/utils/adt/dbsize.c |  119 ++++++++++++++++++++++++++++------------
2 files changed, 89 insertions(+), 35 deletions(-)

pgsql-committers by date

Next:From: Magnus HaganderDate: 2012-01-19 13:30:13
Subject: pgsql: Separate state from query string in pg_stat_activity
Previous:From: Peter EisentrautDate: 2012-01-18 19:03:24
Subject: pgsql: PL/Python: Update example

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group