X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 92E769DD891; Tue, 6 Dec 2005 17:17:49 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 95224-03-6; Tue, 6 Dec 2005 17:17:44 -0400 (AST) X-Greylist: delayed 01:48:11.771362 by SQLgrey- X-Greylist: from auto-whitelisted by SQLgrey- Received: from svr2.postgresql.org (svr2.postgresql.org [65.19.161.25]) by postgresql.org (Postfix) with ESMTP id 591209DD6FF; Tue, 6 Dec 2005 17:17:30 -0400 (AST) Received: from itapoa.terra.com.br (itapoa.terra.com.br [200.176.10.194]) by svr2.postgresql.org (Postfix) with ESMTP id 9F110F0C02; Tue, 6 Dec 2005 19:29:22 +0000 (GMT) Received: from enugu.terra.com.br (enugu.terra.com.br [200.176.10.9]) by itapoa.terra.com.br (Postfix) with ESMTP id 7BC9F6345AD; Tue, 6 Dec 2005 17:29:18 -0200 (BRST) X-Terra-Karma: -2% X-Terra-Hash: 8b04a2175b68f56bca827898b795128a Received-SPF: none (enugu.terra.com.br: 200.176.10.9 is neither permitted nor denied by domain of carcass.dhs.org) client-ip=200.176.10.9; envelope-from=howe@carcass.dhs.org; helo=[10.0.0.3]; Received: from [10.0.0.3] (cm-net-cwb-C8B035A3.dynamic.brdterra.com.br [200.176.53.163]) (authenticated user howe) by enugu.terra.com.br (Postfix) with ESMTP id 193145280FA; Tue, 6 Dec 2005 17:29:17 -0200 (BRST) Message-ID: <4395E68E.3000707@carcass.dhs.org> Date: Tue, 06 Dec 2005 17:29:18 -0200 From: Steve Howe User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013) X-Accept-Language: en-us, en MIME-Version: 1.0 Cc: pgsql-interfaces@postgresql.org, pgsql-odbc@postgresql.org Subject: Re: [ODBC] BLOB handling compatibility with PostgreSQL References: <438B792D.6030802@bnl.gov> <20051205212806.GA17690@soptik.pzkagis.cz> <20051206142811.GA23334@soptik.pzkagis.cz> <259.1133881501@sss.pgh.pa.us> <20051206184402.GA24475@soptik.pzkagis.cz> <15186.1133896033@sss.pgh.pa.us> In-Reply-To: <15186.1133896033@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.189 required=5 tests=[MISSING_HEADERS=0.189] X-Spam-Score: 0.189 X-Spam-Level: X-Archive-Number: 200512/12 X-Sequence-Number: 5880 Tom Lane wrote: >Ludek Finstrle writes: > > >>I don't want to reinvent the wheel. >> >> > >Why do you feel a need to distinguish the domain from its underlying >type on the client side? They're the same as regards representation >and so on. > >The reason for the backend change was that client-side drivers (such as >JDBC and ODBC) want to know the underlying datatype so that they know >what representation to use etc. Distinguishing domains made their job >harder not easier. > > >If you want an add-on datatype that is really different from OID, then >make a real datatype (CREATE TYPE). You can still piggyback on OID as >the representation type --- steal its I/O functions and so on. > > A clear example situation in here is how to be able to distinguish a large object field. The ODBC driver, for instance, uses the 'lo' type, which is the same as an oid (Large Object). I ran into exactly the same situation as I wrote the pgExpress driver for Vita Voom Software: while declaring a domain looks like the clear choice, the original type's oid would be returned by the pq_ftype() function. So I based my solution more or less like this post by Hiroshi Saito: http://www.mail-archive.com/pgadmin-hackers@postgresql.org/msg01390.html ... and asked the users to create the 'lo' type that way, which would create a real type, just like Tom suggests. For more details on how it was implemented on the pgExpress, please check kits documentation: http://www.vitavoom.com/Products/pgExpress_Driver/docs/advanced_features.html#large_objects_declaration Best regards, Steve Howe