Skip site navigation (1) Skip section navigation (2)

Re: About pyvertica (a clone of pyscopg2)

From: Federico Di Gregorio <fog(at)initd(dot)org>
To: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>
Cc: Angel Freire <cuerty(at)gmail(dot)com>, psycopg(at)postgresql(dot)org
Subject: Re: About pyvertica (a clone of pyscopg2)
Date: 2011-09-07 09:52:23
Message-ID: 4E673ED7.6050503@initd.org (view raw or flat)
Thread:
Lists: psycopg
On 07/09/11 11:38, Daniele Varrazzo wrote:
[snip]
> It may have been this:
> 
> http://stackoverflow.com/questions/2695684/using-an-odbc-application-with-a-jdbc-driver
> 
> Looks like Vertica has a few differences in the types oid.
> Unfortunately there is at least a conflict: from the patch I see oid
> 16 is used by Vertica as a decimal type, while Postgres uses the same
> oid for the bool type. A solution could be to detect vertica at
> connection time (which seems done by checking server_version = 0, I
> don't know if there is a more robust way) and re-organize the
> typecaster map accordingly.

If that are the only changes needed we can probably reorganize the type
map into two different maps and attach the correct one at connection
time. Then psycopg would be able to work with Vertica and PostgreSQL at
the same time. Pretty useful to transfer data to and from. :)

federico

-- 
Federico Di Gregorio                                       fog(at)initd(dot)org
  Nessuno dice che non si possa sognare in dettaglio, essere realistici
   e magari realizzarlo pure, il sogno.                        -- <dani>

In response to

psycopg by date

Next:From: Marco BeriDate: 2011-09-07 09:58:24
Subject: Re: About pyvertica (a clone of pyscopg2)
Previous:From: Daniele VarrazzoDate: 2011-09-07 09:38:52
Subject: Re: About pyvertica (a clone of pyscopg2)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group