Thread: Import: about ODBC data source

Import: about ODBC data source

From
Quan Zongliang
Date:
Hi All,

The wxWidgets framework has some classes relative to ODBC:
wxDb/wxDbTable and so on.
Them is controlled by identifier wxUSE_ODBC.
Default is 0, that is, don't compiling with wxWidgets.

My idea is only support this function (import from ODBC) under MS-Windows
using Microsoft API. Although there is iODBC (http://www.iodbc.org)
under Unix implemented the ODBC API.

OK?

Regards.

-----------------------------------------------
Quan Zongliang
quanzongliang@gmail.com
CIT Japan:  http://www.cit.co.jp
CIT China:  http://www.citbj.com.cn


Re: Import: about ODBC data source

From
"Dave Page"
Date:
On Wed, Jan 14, 2009 at 12:14 PM, Quan Zongliang
<quanzongliang@gmail.com> wrote:
> Hi All,
>
> The wxWidgets framework has some classes relative to ODBC:
> wxDb/wxDbTable and so on.
> Them is controlled by identifier wxUSE_ODBC.
> Default is 0, that is, don't compiling with wxWidgets.
>
> My idea is only support this function (import from ODBC) under MS-Windows
> using Microsoft API. Although there is iODBC (http://www.iodbc.org)
> under Unix implemented the ODBC API.

iODBC is used on Mac, but in my experience, unixODBC is more popular
on Linux. I don't know what is used on Solaris or the BSDs. I'm not
keen on the idea of only offering functionality on one platform.

Without using wxUSE_ODBC, I don't see that you'll be able to do this
nicely in a cross platform way. I suppose you could allow the user to
select the ODBC driver libraries (eg. psqlodbc.so) directly, but that
will mean that DSNs can't be used.

Anyone else got any thoughts?

--
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com

Re: Import: about ODBC data source

From
Guillaume Lelarge
Date:
Dave Page a écrit :
> On Wed, Jan 14, 2009 at 12:14 PM, Quan Zongliang
> <quanzongliang@gmail.com> wrote:
>> Hi All,
>>
>> The wxWidgets framework has some classes relative to ODBC:
>> wxDb/wxDbTable and so on.
>> Them is controlled by identifier wxUSE_ODBC.
>> Default is 0, that is, don't compiling with wxWidgets.
>>
>> My idea is only support this function (import from ODBC) under MS-Windows
>> using Microsoft API. Although there is iODBC (http://www.iodbc.org)
>> under Unix implemented the ODBC API.
>
> iODBC is used on Mac, but in my experience, unixODBC is more popular
> on Linux. I don't know what is used on Solaris or the BSDs. I'm not
> keen on the idea of only offering functionality on one platform.
>
> Without using wxUSE_ODBC, I don't see that you'll be able to do this
> nicely in a cross platform way. I suppose you could allow the user to
> select the ODBC driver libraries (eg. psqlodbc.so) directly, but that
> will mean that DSNs can't be used.
>
> Anyone else got any thoughts?
>

I don't quite understand why we would want to use ODBC in pgAdmin. One
thing that makes pgAdmin great is its use of libpq. Can someone explain
me why we should use ODBC ?


--
Guillaume.
 http://www.postgresqlfr.org
 http://dalibo.com

Re: Import: about ODBC data source

From
"Dave Page"
Date:
On Wed, Jan 14, 2009 at 1:21 PM, Guillaume Lelarge
<guillaume@lelarge.info> wrote:

> I don't quite understand why we would want to use ODBC in pgAdmin. One
> thing that makes pgAdmin great is its use of libpq. Can someone explain
> me why we should use ODBC ?

To import data from diverse data sources.

--
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com

Re: Import: about ODBC data source

From
Guillaume Lelarge
Date:
Dave Page a écrit :
> On Wed, Jan 14, 2009 at 1:21 PM, Guillaume Lelarge
> <guillaume@lelarge.info> wrote:
>
>> I don't quite understand why we would want to use ODBC in pgAdmin. One
>> thing that makes pgAdmin great is its use of libpq. Can someone explain
>> me why we should use ODBC ?
>
> To import data from diverse data sources.
>

Ohhh, /me feeling stupid. Need more caffeine... or more sleep.

Sorry about this.


--
Guillaume.
 http://www.postgresqlfr.org
 http://dalibo.com

Re: Import: about ODBC data source

From
Magnus Hagander
Date:
Dave Page wrote:
> On Wed, Jan 14, 2009 at 12:14 PM, Quan Zongliang
> <quanzongliang@gmail.com> wrote:
>> Hi All,
>>
>> The wxWidgets framework has some classes relative to ODBC:
>> wxDb/wxDbTable and so on.
>> Them is controlled by identifier wxUSE_ODBC.
>> Default is 0, that is, don't compiling with wxWidgets.
>>
>> My idea is only support this function (import from ODBC) under MS-Windows
>> using Microsoft API. Although there is iODBC (http://www.iodbc.org)
>> under Unix implemented the ODBC API.
>
> iODBC is used on Mac, but in my experience, unixODBC is more popular
> on Linux. I don't know what is used on Solaris or the BSDs. I'm not
> keen on the idea of only offering functionality on one platform.
>
> Without using wxUSE_ODBC, I don't see that you'll be able to do this
> nicely in a cross platform way. I suppose you could allow the user to
> select the ODBC driver libraries (eg. psqlodbc.so) directly, but that
> will mean that DSNs can't be used.
>
> Anyone else got any thoughts?

One thing that would be very useful on Unix, I think, would be to be
able to use DBD drivers.

I guess if we flip back to the discussion from earlier, this could be
handled if we integrated python (or perl for DBD, but since we were
considering python in a general sense). Then we could generate a
datastream from any driver there.

However, I'm unsure if those drivers provide things like "enumerating
tables", but it's probably possible to do that through a very thing db
wrapper (we'd only need the table name - all other metadata required to
transfer the *data* is available in the api)

//Magnus

Re: Import: about ODBC data source

From
"Dave Page"
Date:
On Wed, Jan 14, 2009 at 1:38 PM, Guillaume Lelarge
<guillaume@lelarge.info> wrote:
> Dave Page a écrit :
>> On Wed, Jan 14, 2009 at 1:21 PM, Guillaume Lelarge
>> <guillaume@lelarge.info> wrote:
>>
>>> I don't quite understand why we would want to use ODBC in pgAdmin. One
>>> thing that makes pgAdmin great is its use of libpq. Can someone explain
>>> me why we should use ODBC ?
>>
>> To import data from diverse data sources.
>>
>
> Ohhh, /me feeling stupid. Need more caffeine... or more sleep.

:-D


--
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com

Re: Import: about ODBC data source

From
Quan Zongliang
Date:
> Without using wxUSE_ODBC, I don't see that you'll be able to do this
> nicely in a cross platform way. I suppose you could allow the user to
> select the ODBC driver libraries (eg. psqlodbc.so) directly, but that
> will mean that DSNs can't be used.

Initially, my plan is only implement ODBC under MS-Windows.
Because I have some experience with it. Until I found the wxODBC.
And almost all works I did is under Windows, so I have the illusion that
other playform scarcely use ODBC.

Well, no question about this yet.

Thanks.

-----------------------------------------------
Quan Zongliang
quanzongliang@gmail.com
CIT Japan:  http://www.cit.co.jp
CIT China:  http://www.citbj.com.cn


Re: Import: about ODBC data source

From
"Hiroshi Saito"
Date:
Hi.

> I don't quite understand why we would want to use ODBC in pgAdmin. One
> thing that makes pgAdmin great is its use of libpq. Can someone explain
> me why we should use ODBC ?

I think that it will use when the Postgres itself has a linkserver function.
Probably, it seems to be a SQLServer Manager.  :-)
But, It seems that however, it is still far....

Regards,
Hiroshi Saito

Re: Import: about ODBC data source

From
Magnus Hagander
Date:
Hiroshi Saito wrote:
> Hi.
>
>> I don't quite understand why we would want to use ODBC in pgAdmin. One
>> thing that makes pgAdmin great is its use of libpq. Can someone explain
>> me why we should use ODBC ?
>
> I think that it will use when the Postgres itself has a linkserver
> function.
> Probably, it seems to be a SQLServer Manager.  :-)
> But, It seems that however, it is still far....

While that would be nice to have, I still think it would make a lot of
sense to be able to do it from pgAdmin as well. It's not at all uncommon
to load things from say an access database or even an excel spreadsheet,
and you don't necessarily want to have those on your db server...

//Magnus


Re: Import: about ODBC data source

From
"Hiroshi Saito"
Date:
Hi.

> While that would be nice to have, I still think it would make a lot of
> sense to be able to do it from pgAdmin as well. It's not at all uncommon
> to load things from say an access database or even an excel spreadsheet,
> and you don't necessarily want to have those on your db server...

Yeah, I did slightly interesting approach by OSC.
http://winpg.jp/~saito/pgAdmin/OSC2008Fukuoka.ppt
But , It is Japanese:-)

Regards,
Hiroshi Saito

Re: Import: about ODBC data source

From
Quan Zongliang
Date:
> Yeah, I did slightly interesting approach by OSC.
> http://winpg.jp/~saito/pgAdmin/OSC2008Fukuoka.ppt
> But , It is Japanese:-)
Good document!
I can read it slowly.

-----------------------------------------------
Quan Zongliang
quanzongliang@gmail.com
CIT Japan:  http://www.cit.co.jp
CIT China:  http://www.citbj.com.cn


Re: Import: about ODBC data source

From
"Hiroshi Saito"
Date:
Hi.


>> Yeah, I did slightly interesting approach by OSC.
>> http://winpg.jp/~saito/pgAdmin/OSC2008Fukuoka.ppt
>> But , It is Japanese:-)
> Good document!
> I can read it slowly.

Yey, :-)

Next, I will talk here. (20th)!
http://www.ospn.jp/osc2009-spring/
However, one session is plproxy+pgbouncer.
and, another session is new pgAdmin+ pg8.4.
Therfore, I will surely be able to meet you.:-)

Regards,
Hiroshi Saito