There are currently missing Ensures in the path handler. As it is now, we
can't set IsArbitraryLength to false since then GetValue will Ensure the
bytes, but there aren't always space enough (you cannot Ensure more than
the size of the NpgsqlBuffer) if the path has very many points...

2015-01-01 21:47 GMT+01:00 Shay Rojansky <notifications@github.com>:

> The way things are handled right now, this is very problematic.
>
> IsArbitraryLength tells the DataReader whether this type handler expects
> the buffer to contain the entire value, or whether the type handler will
> actually handle reading from the socket (via Ensure). You can see this in
> GetValue() and other places. Handlers such as bytea and string invoke
> methods on NpgsqlBuffer which can read data into the buffer, but for all
> other handlers GetValue() does one big ensure before invoking the handler.
>
> So turning this feature on for PathHandler means it has to start calling
> Ensure() internally, which probably isn't worth the work - better to treat
> as a "small" value and have it read into the entire buffer.
>
> I know the name IsArbitraryLength isn't very good, it should be something
> like ManagesBuffer or something.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/npgsql/npgsql/commit/45df1cc850cc84642e120fc0061e953c189dfab1#commitcomment-9133163>
> .
>