X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 8E5258BA1AA for ; Fri, 11 Feb 2005 12:55:01 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 89131-10 for ; Fri, 11 Feb 2005 12:54:50 +0000 (GMT) Received: from mail.logi-track.com (burro.logi-track.com [213.239.193.212]) by svr1.postgresql.org (Postfix) with ESMTP id 335578BA1B5 for ; Fri, 11 Feb 2005 12:54:52 +0000 (GMT) Received: from kingfisher.intern.logi-track.com (J3b73.j.pppool.de [85.74.59.115]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.logi-track.com (Postfix) with ESMTP id 67533308C9; Fri, 11 Feb 2005 13:54:55 +0100 (CET) Received: from [127.0.0.1] (localhost [127.0.0.1]) by kingfisher.intern.logi-track.com (Postfix) with ESMTP id D0FA0165E58; Fri, 11 Feb 2005 13:54:50 +0100 (CET) Message-ID: <420CAB1A.10908@logi-track.com> Date: Fri, 11 Feb 2005 13:54:50 +0100 From: Markus Schaber User-Agent: Mozilla Thunderbird 1.0 (X11/20050116) X-Accept-Language: de-DE, de, en-us, en MIME-Version: 1.0 To: Thomas Hallgren Cc: "pgsql-jdbc@postgresql.org" , Filip Hrbek Subject: Re: PLJava and Database Meta Data References: <420B87A7.6080407@mailblocks.com> <420C8477.7060604@logi-track.com> <420C8647.2010506@mailblocks.com> <420C8F16.9040708@logi-track.com> <420C9333.9040208@mailblocks.com> <420C982D.9050401@logi-track.com> <420CA013.8070009@mailblocks.com> In-Reply-To: X-Enigmail-Version: 0.90.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200502/90 X-Sequence-Number: 12270 Hi, Thomas, Thomas Hallgren schrieb: >> For complex datatypes, if you use the internal representation for your >> java mapping, you have to parse bytes, 32-bit integers, doubles and such >> from the in-memory representation. >> > We never parse any bytes. The internal representation of a double in the > backend is, a double. The SPI layer communicates values in terms of > datums that holds C-language char, short, int, long, float, double, etc. > values and JNI treats them as their native Java correspondance in the > Java layer. The same is true for the actuall call handler used for SQL > function calls into Java. Okay, so this is fine for primitive types. How does SPI deal with complex types? >> Alternatively, you can use the canonical representations >> (using the types INPUT/OUTPUT/SEND/RECEIVE functions), but this incurs >> additional overhead. >> > Do you have any concrete measurments where this overhead is significant? > In my experience, using input/output/send/receive incurs a very low > overhead. I doubt that it's even measurable. Yes, I have. Especially for large geometries. In our database, we have geometry objects up to 20MB per piece. Also, in PostGIS, send/receive binary representation differs slightly from internal representation (and input/output text is even more overhead). >> Is there any documentation about such PLJava internals? >> > The source code :-) > Seriosly, if you want to know PLJava internals, it's not that bad to > look at. It's fairly well commented. Okay, I'll do so. Markus -- markus schaber | dipl. informatiker logi-track ag | rennweg 14-16 | ch 8001 zürich phone +41-43-888 62 52 | fax +41-43-888 62 53 mailto:schabios@logi-track.com | www.logi-track.com