Re: Seeking PL/PGSQL example

From: John DeSoi <desoi(at)pgedit(dot)com>
To: John Wells <jb(at)sourceillustrated(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Seeking PL/PGSQL example
Date: 2005-08-13 11:15:54
Message-ID: BF570CF7-A9E4-45CD-A416-4EED74211EF1@pgedit.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Aug 12, 2005, at 5:26 PM, John Wells wrote:

> I'm getting started with PL/PGSQL but want to understand if the
> following
> is even possible:
>
> With PL/PGSQL, how would I roll through all tables in my database and
> print the table name, along with the row count of that table?
>
> Sorry if this is too simplistic. I've googled but must not be
> phrasing my
> question properly. Currently reading through the manual, but if
> someone
> has any helpful tips I'd appreciate it.

There is some code here that shows how to loop through all tables to
grant or revoke access privileges. You can easily adapt it to print
table name and row count.

http://pgedit.com/node/20

John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL

In response to

Browse pgsql-general by date

  From Date Subject
Next Message William ZHANG 2005-08-13 13:16:55 Re: Where can I download HTML manual?
Previous Message Michael Fuhr 2005-08-13 02:36:52 Re: append to the current search_path