Re: PostgreSQL 9.0b1 - Error when checking table sizes

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Thom Brown <thombrown(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: PostgreSQL 9.0b1 - Error when checking table sizes
Date: 2010-05-28 00:30:46
Message-ID: 20100528003046.GO21875@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

* Thom Brown (thombrown(at)gmail(dot)com) wrote:
> psql -U postgres -d test -c "select tablename,
> pg_size_pretty(pg_table_size(tablename::regclass)) from pg_tables
> where schemaname = 'public' order by tablename;"
>
> And this, for some reason, works... which is how I did it the other
> day (hence why I've only just got the error today).

public is in your search_path by default- that's why it works. Still,
it's not really a *good* approach. Use the one that Tom showed.

Thanks,

Stephen

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Matt Nourse 2010-05-28 02:53:11 BUG #5477: CREATE DOMAIN NOT NULL constraints not always enforced for INSERT with subquery
Previous Message Krzysztof Nienartowicz 2010-05-27 23:04:17 Re: Query causing explosion of temp space with join involving partitioning