[postgis-devel] dumper with binary cursor

strk strk at keybit.net
Wed Nov 26 11:00:26 PST 2003


Ok, I've found and fixed the bug in HexDecoder
(I had to substract 55, not 65 to ascii A-F... in order to get 10-15)

Then I've made WKB the default working mode for pgsql2shp.
Still you can use -b to use binary cursor, or get the default text cursor.

Note that both text and binary cursor go faster now than in WKT parsing.

If it is ok for everyone I'd drop WKT parsing completely.

Please let me know.

--strk;


strk wrote:
> With the great suggestion from Dave I've implemented
> a quick binary cursor scan for the dumper.
> 
> It currently does not bother checking catalog entries to
> find the appropriate ->text conversion funx and tries ::text.
> 
> If ::text does not work user receives a message like:
> ERROR:  Cannot cast type <your_type_here> to text
> 
> In that case the user will have to go back to text cursor.
> Text cursor is the default, to enable binary cursor you have
> to use the -b flag.
> 
> Note that if you do not set USE_WKB the -b flag will just
> transfer few more bytes (the varsize info...).
> 
> So, to see the real speed you should: define USE_WKB and
> call with -b.
> 
> PS: The code is getting real spaghetti, I plan to make binary
>     cursor the default and drop many lines of code. This can be
>     possible as far as for every  type in db a ->text conversion 
>     function MUST exist.
> 
> --strk;
> 
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel



More information about the postgis-devel mailing list