On 16 Nov 2001, Jason E. Stewart wrote: > Grrrr.... > > I'm sure that Storable is fast at what it does, but I don't see why > the data must be serialized in the first place. If Pg can pass char*'s > back and forth, why shouldn't it be able to pass void*'s? That way I > could pass an SV* to an arbitrary data structure. I think you are still missing the point. Data between client and server are passed as a stream of characters. To pass an array, you somehow have to a) mark that this is an array and b) delimit elements in array.
Both of these things must be done, no matter where you do it. Options are: * your code (via split/join) * DBD::Pg (implicit split/join when array is detected) * your code/server code using Storable You are also missing the point that split/join are quite fast as they are written in C. All of above methods will probably have similar overhead. Storable may be a bit slower but you are not limited to arrays there. > I've got tables that will have millions of rows, and I don't want to > have to serialize them at all, that's just wasted computation. Point is, you have to. Somewhere. > Ok. Is this because there aren't enough warm bodies to actually write > the code, or because there is some fundamental issue that prevents it > from happening? Because postgresql stored procedures fundamentally cannot update their arguments. > Even so. If it did exist, would it enable me to pass void*'s to and > from the stored procedures? Void * to what? If you mean you want to pass an array by reference, _YOU CANNOT DO THAT_, as server and client do not share memory and you have to explicitly pass along all elements of an array to the server. -alex
