[postgis-devel] history management

strk strk at keybit.net
Thu Feb 25 10:14:14 PST 2010


On Thu, Feb 25, 2010 at 07:07:50PM +0100, strk wrote:
> On Thu, Feb 25, 2010 at 07:03:50PM +0100, strk wrote:
> 
> > PL/pgSQL function "postgis_enable_history" line 66 at EXECUTE statement
> > ERROR:  cannot EXECUTE a null querystring
> > CONTEXT:  PL/pgSQL function "postgis_enable_history" line 67 at EXECUTE statement
> 
> Added some debugging:
> 
> DEBUG:  Executing query for updating geometry_columns: <NULL>
> ERROR:  cannot EXECUTE a null querystring

Now I see. The problem is *exactly* deriving from the attempt
to write a record in geometry_columns. That's because the code
attempts to fetch the type and srid and whatnot from the current
geometry_columns for the original table, so if the table is not
listed there, it'll get NULL results which will be inherited
by the subsequent "string concatenate" operation to get the
SQL for updating geometry_columns.

Seriously, why would you want a record in geometry_column for
the history table ? What's wrong in adding it later ? Are
the functions to manage geometry_column not easy enough ?

--strk; 

  ()   Free GIS & Flash consultant/developer
  /\   http://foo.keybit.net/~strk/services.html



More information about the postgis-devel mailing list