Opened 14 years ago

Closed 14 years ago

#333 closed defect (fixed)

VACUUM in spatial_ref_sys.sql throws error

Reported by: kneufeld Owned by: pramsey
Priority: medium Milestone: PostGIS 1.5.0
Component: postgis Version: master
Keywords: Cc:

Description

Loading the spatial_ref_sys.sql file manually in PgAdmin III throws the error:

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
SQL state: 25001

I recommend the two offending lines (1719 and 15142)

VACUUM ANALYZE spatial_ref_sys;

be replaced with

ANALYZE spatial_ref_sys;

VACUUM is not needed anyway since no DELETEs or UPDATEs have taken place, only INSERTs - there's no need to reclaim space.

Change History (3)

comment:1 by kneufeld, 14 years ago

Also, is there a reason the file is broken into two transaction blocks?

When loading in PgAdmin, the first transaction succeeds, but then the VACUUM breaks the script. The data is partly loaded. I can't rerun the script, I have to truncate the table first, then attempt a reload.

This kinda defeats the purpose of having a single transaction block, no?

comment:2 by pramsey, 14 years ago

Feel free to fix. P.

comment:3 by kneufeld, 14 years ago

Resolution: fixed
Status: newclosed

Removed unnecessary VACUUM.

Turned file into a single transaction.

Fixed at r4987

Note: See TracTickets for help on using tickets.