[OSM-dev] planetosm-to-db.pl: What is the 'enable_keys()' function?

Joerg Ostertag (OSM Munich/Germany) openstreetmap at ostertag.name
Mon Nov 13 23:42:59 GMT 2006

On Monday 13 November 2006 20:00, Nick Whitelegg wrote:
> Hello Nick,
> Looks like planetosm-to-db.pl (latest version) requires a function called
> 'enable_keys()', which (on the dev box at least) cannot be found. It does

I'll check and update svn tomorrow. For now just comment it out.
It start/stops indexing. Which makes the Database updates tremendously faster.

> not seem to be present anywhere in the SVN archive, and a Google search for
> 'enable_keys perl' brings planetosm-to-db as the top relevant search so it
> must be an OSM specific function. How can I get hold of it?

It is in gpsdrive/scripts/... too ;-)


# -----------------------------------------------------------------------------
# switch off updating of index
sub disable_keys($){    
    my $table = shift;
    print "disable_keys($table)\n" if $verbose;
    db_exec("ALTER TABLE  $table DISABLE KEYS;");

# -----------------------------------------------------------------------------
# switch on updating of index
sub enable_keys($){
    my $table = shift;
    print "enable_keys($table)\n" if $verbose;
    db_exec("ALTER TABLE  $table ENABLE KEYS;");

More information about the dev mailing list