pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Steve Howe <howe@carcass.dhs.org>
Cc: pgsql-interfaces@postgresql.org
Cc: pgsql-odbc@postgresql.org
Subject: Re: [ODBC] BLOB handling compatibility with PostgreSQL
Date: Tue, 06 Dec 2005 17:29:18 -0200
Message-ID: <4395E68E.3000707@carcass.dhs.org> (raw)
In-Reply-To: <15186.1133896033@sss.pgh.pa.us>
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>

Tom Lane wrote:

>Ludek Finstrle <luf@pzkagis.cz> 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_declarat...

Best regards,
Steve Howe



view thread (24+ messages)  latest in thread

Message-ID: <4395E68E.3000707@carcass.dhs.org>
Permalink:  ../4395E68E.3000707@carcass.dhs.org/
Also on:    postgresql.org/message-id/4395E68E.3000707@carcass.dhs.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: howe@carcass.dhs.org, pgsql-odbc@postgresql.org
  Subject: Re: [ODBC] BLOB handling compatibility with PostgreSQL
  In-Reply-To: <4395E68E.3000707@carcass.dhs.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox