[postgis-devel] Rules and Extensions
Paul Ramsey
pramsey at opengeo.org
Fri Jun 22 12:53:51 PDT 2012
One thing I noticed doing a little test on our extension and pg_dump,
I made a database, created the postgis extension, created a table with
a geometry column, and dumped it.
Inside the dump, we get (yay!) the create extension command and (hmmm)
a few 'create rule' lines...
CREATE RULE geometry_columns_delete AS ON DELETE TO geometry_columns
DO INSTEAD NOTHING;
CREATE RULE geometry_columns_insert AS ON INSERT TO geometry_columns
DO INSTEAD NOTHING;
CREATE RULE geometry_columns_update AS ON UPDATE TO geometry_columns
DO INSTEAD NOTHING;
So, when you try and do the restore process...
create database
load dump file
You get three errors
ERROR: rule "geometry_columns_delete" for relation "geometry_columns"
already exists
ERROR: rule "geometry_columns_insert" for relation "geometry_columns"
already exists
ERROR: rule "geometry_columns_update" for relation "geometry_columns"
already exists
Because the extension creates the rules, but they are also in the dump file.
Not critical, but not perfect.
P.
More information about the postgis-devel
mailing list