howpom (3) [Avatar] Offline
#1
I get the following error when I try to execute the complete SQL on p. 20.

VACUUM ANALYZE hello.poi;
VACUUM ANALYZE hello.coastline;

ERROR: VACUUM cannot be executed from a function or multi-command string

********** Error **********

ERROR: VACUUM cannot be executed from a function or multi-command string
regina.leo (265) [Avatar] Offline
#2
Re: SQL Error on p. 20
Sorry about that we'll clarify that in the book.

The below can be run from psql as a single unit.

If you are running from PgAdminIII, then select a statement and click the green arrow. Then select the second and click the green arrow.

This is because PgAdminIII wraps a transaction around the whole request it sends to the server and psql doesn't unless you explicitly wrap a beign commit around it.


In this case each statement has to be run as a separate transaction.