From: thomas at tada.se (Thomas Hallgren) Date: Fri, 29 Sep 2006 16:06:01 +0200 Subject: [Pljava-dev] VarLenTuple example code In-Reply-To: <451D2198.7050202@logix-tt.com> References: <451BD0B1.8000408@logix-tt.com> <451BD2F4.60202@tada.se> <451BD650.2080201@logix-tt.com> <451BDB5E.1020107@tada.se> <451BE12B.6060809@logix-tt.com> <451BF32A.7000405@tada.se> <451CF211.7000000@logix-tt.com> <451CFAAD.9030603@tada.se> <451D0B0B.4010008@logix-tt.com> <451D10E0.8020003@tada.se> <451D2198.7050202@logix-tt.com> Message-ID: <451D2849.8030109@tada.se> Hi Markus, OK, now I think I finally understand what it is you are trying to hammer through my thick skull :-) You are saying that two mechanisms are not enough. We need: The text (canonical) to disc conversion (the current input/output) The external binary (canonical) format (used in various protocols) to disc conversion (the send/receive). A way to create Java objects from canonical binary format. A way to create the canonical binary format from Java objects. Then it all falls into place. This is what I think needs to be done: 1. We need two new methods. One that does the C -> B conversion and one that does the B -> C. I.e. verbatim Java implementations of the send/receive. Those methods should be static since this is a byte[] to byte[] conversion only. 2. The readSQL methods should be called with an SQLInput that wraps the output of the C -> B converter. 3. The data written by the writeSQL method should be passed to the B -> C converter. And of course, Java really comes into play when a COPY is performed since the B -> C and C ->B must be executed. Sorry for being so thick-headed. Kind Regards, Thomas Hallgren