[postgis-devel] Loader cleanup
Markus Schaber
schabi at logix-tt.com
Wed Apr 6 06:47:57 PDT 2005
Hi, Strk,
strk at refractions.net schrieb:
> - GID omission.
>
> Current loader explicitly set the gid when NOT
> in append mode. I'd make it *always* act like that
> and rely on the 'serial' type. Do you see any
> problem with that ?
I think this is a good change as it simplifies code.
> - TRANSACTION
>
> Current loader breaks insert lines in multiple
> transaction blocks. It has been noted that this
> should speed things up, but I'm afraid it would
> add half-shapes (skipping the bogus transaction
> block and continue with the rest). Would it be
> ok for you wrapping the whole code in a single
> transaction relying on dump mode (-D) for speed
> reasons ?
I think this is a good idea, too.
> - NULL shapes
>
> Current loader checks shapefile and exits with
> an error if all shapes are null (or contain no
> vertexes). This requires two shapefile scans
> (check scan, load scan).
When multiple transaction blocks are removed, we can do the checking on
the fly. When we detect a NULL value, we can do
if (dump_format) printf("\\.\n");
printf("ABORT;\n")
and spit out an error message on stderr.
> Since the load scan
> copes cleanly with null shapes what about dropping
> the first scan allowing for a all-nulls shapefile
> to produce an all-nulls geometry features table ?
> (attributes would still be loaded!)
You could invent a command line switch whether NULL geometries are to be
allowed. But this could also be done on the SQL level using a NOT NULL
constraint, this is what we currently do. Keeping consistency checks
inside the database is always a good thing. :-)
Markus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20050406/2ce59357/attachment.sig>
More information about the postgis-devel
mailing list