Re: 4GL: any upper limit on what a function can return?
Posted in 1997
>From: proberts@informix.com (Paul Roberts) >Date: 23 Jun 1997 20:42:52 GMT >X-Informix-List-Id: <news.39551> > >I've looked through an assortment of manuals and haven't found the answer >to this (although I'm quite prepared to believe that the answer lies in >some hitherto unexplored manual)... > >Isn't there a limit on the amount of data that a 4GL function can return? >Perhaps the maximum length of a text string, or the maximum total length >of all text strings returned, or something (the number 256 comes to mind)? Well, it depends on the version, and yes, there are (still) limits, but the current limits are fairly generous. Prior to 4.12/6.00, there was a limit of 511 bytes per string and no more than 5120 string bytes in total that could be returned (and you could run into problems from about 2570 bytes upwards). Starting with versions 4.12/6.00, the limit on a single string is 32767 bytes (consistent with the fact that you can't declare a string bigger than that!), and the limit on the number of such return values is indefinitely large. That said, the return mechanism involves several copies, so you do not want to be too profligate with large return values. >I want to have my 4GL function return a set of 13 text strings to the >calling program, and I want to be sure that I'm not going to run up >against some limit of just how much stuff such a function can return. > >I'm using 4GL 6.01.UD1 Well, there should not be any problems with that, though it might depend on what you mean by 'text strings'; if those are strings corresponding to TEXT blobs, then the strings must be less than 32kB each. I think you'll find this mentioned in the release notes, somewhere, probably under the rubric of eliminating error -4518 (aka Bug B1857). Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>