Re: vacuum full for all databases - Mailing list pgsql-general

From Ilia Chipitsine
Subject Re: vacuum full for all databases
Date
Msg-id 20040902141204.M15260@office.paramon.ru
Whole thread Raw
In response to Re: vacuum full for all databases  (Richard Huxton <dev@archonet.com>)
List pgsql-general
> Ilia Chipitsine wrote:
> > Dear Sirs
> >
> > I'm about to write plpgsql function which will "vacuum full" all existing
> > databases. Below is an example how to get list of databases.
> >
> > What should I write instead of "raise notice" ?
>
> >   raise notice ''datname = %'',list.datname;
>
> Something like:
>    EXECUTE ''VACUUM FULL '' || list.datname;

"vacuum full" accepts relation name, not database name

$ psql -U pgsql template1
Welcome to psql 7.4.2, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help on internal slash commands
       \g or terminate with semicolon to execute query
       \q to quit

template1=# vacuum full site_b170;
ERROR:  relation "site_b170" does not exist
template1=#

>
> --
>    Richard Huxton
>    Archonet Ltd
>

pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: vacuum full for all databases
Next
From: reina_ga@hotmail.com (Tony Reina)
Date:
Subject: Re: can't build libpq with beta 2