Subject Re: [Firebird-Architect] Sending very very long statements
Author Jim Starkey
Martijn Tonies wrote:
>>>>> We also need a way to pass strings of unknown length.
>>>>>
>>>>>
>>>> Isn't that limitation of the remote protocol handler?
>>>>
>>>>
>>>>
>>> The remote protocol sends all strings as counted strings.
>>>
>>> How do you send a string of unknown length?
>>>
>> By letting the client count the string length, cut it up and send
>> it in segments?
>>
>
> Let me get back on this --
>
> How much sense would it make, to let the Firebird Client handle
> this?
>
> I mean, let any client component set just "prepare" or "execute"
> a 100Mb statement (or whatever). The Firebird client would then
> see "hey, that's very very large" and use the appropriate network
> stuff so that it prepares something so that the server would then
> be ready-ed to accept a very long string as a statement, instead of
> 1 single statement.
>
There a gobs of 64K restrictions in the server. All are historical and
can be eliminated, but BLR would have to be extended for 4 byte counts
and lengths for openers, and couple of other dozen things fixed as well.

It would be smarter to find out why such ludicrous statements are being
used and extend SQL to make them unnecessary.
>
> Would this make sense? I understand this is a change in the
> wire protocol, but it would finally get Firebird up to date with
> regard to sending BLOBs to the server like the SQL Standard
> specifies.
>
>
Somehow I think the SQL standard is silent about how blobs are
communicated between a client and the server. I agree that it would be
nice to allow arbitrary conversion between various types and blobs
(almost everyone else has them), but I don't think any change is
necessary to the wire protocol to support them.