Ticket #333 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

VACUUM in spatial_ref_sys.sql throws error

Reported by: kneufeld Owned by: pramsey
Priority: medium Milestone: PostGIS 1.5.0
Component: postgis Version: trunk
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

Changed 2 years ago by kneufeld

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?

Changed 2 years ago by pramsey

Feel free to fix. P.

Changed 2 years ago by kneufeld

  • status changed from new to closed
  • resolution set to fixed

Removed unnecessary VACUUM.

Turned file into a single transaction.

Fixed at r4987

Note: See TracTickets for help on using tickets.