Обсуждение: odbc_fdw

Поиск
Список
Период
Сортировка

odbc_fdw

От
Дата:
Hi there!

I built the current PostgreSQL 9.1.1 sources under Ubuntu 11.04 (in a VMware under Win7).
I followed the steps in this guide:
www.thegeekstuff.com/2009/04/linux-postgresql-install-and-configure-from-source

It seems to work (I can run the server and connect to it with PgAdmin).

Now I'd like to integrate the ODBC_FDW extension in my installation. However, I don't really
understand the steps described on the download page:
pgxn.org/dist/odbc_fdw/0.1.0

Can anybody tell me how to build it? I'm a software developer myself but a Linux newbie...

Thank you for your help!

Re: odbc_fdw

От
"Albe Laurenz"
Дата:
fschwend at hsr.ch wrote:
> I built the current PostgreSQL 9.1.1 sources under Ubuntu 11.04 (in a
VMware under Win7).
> I followed the steps in this guide:
>
www.thegeekstuff.com/2009/04/linux-postgresql-install-and-configure-from
-source
>
> It seems to work (I can run the server and connect to it with
PgAdmin).
>
> Now I'd like to integrate the ODBC_FDW extension in my installation.
However, I don't really
> understand the steps described on the download page:
> pgxn.org/dist/odbc_fdw/0.1.0
>
> Can anybody tell me how to build it? I'm a software developer myself
but a Linux newbie...

I haven't tried it, but looking at the instructions I would say:

1) Install UnixODBC. If you use Packages, make sure you install the
headers too
   (on my RHEL system, the packages are called unixODBC and
unixODBC-devel).

2) Get odbc_fdw and unzip the source.

3) Change into the source directory.

4) Run "make" and "make install" as the web page describes it
(substituting
   the path to your configured PostgreSQL source tree).

If there still is something unclear, ask for details.

Yours,
Laurenz Albe

Re: odbc_fdw

От
"Albe Laurenz"
Дата:
Florian Schwendener wrote:
> Thank you for your help. As I know little about Linux and only a bit
> about make files, I really don't know if
> I'm doing the right thing. I've typed this:
>
> root@ubuntu:/home/user/Downloads/odbc_fdw-0.1.0#
> PATH=/usr/local/pgsql/bin/:$PATH make USE_PGXS=1 make
> make: *** No rule to make target `make'.  Stop.
>
> You see, I haven't come far... Am I doing something wrong?

Yes, there are two "make"s in your line. Try

PATH=/usr/local/pgsql/bin/:$PATH make USE_PGXS=1

Yours,
Laurenz Albe

Re: odbc_fdw

От
"Albe Laurenz"
Дата:
Florian Schwendener wrote:
[has problems building odbc_fdw]
> Oh, didn't see that! Now it says:
>
> root@ubuntu:/home/user/Downloads/odbc_fdw-0.1.0#
> PATH=/usr/local/pgsql/bin/:$PATH make USE_PGXS=1
> make: Nothing to be done for `all'.
>
> I remember trying a few options with the make command. Is it maybe
> already built?

Looks like it.

You can
PATH=/usr/local/pgsql/bin/:$PATH make USE_PGXS=1 clean
to delete already built files.

Then you can rebuild.

After building, use
PATH=/usr/local/pgsql/bin/:$PATH make USE_PGXS=1 install
to install.

Yours,
Laurenz Albe

Re: odbc_fdw

От
Eduardo Morras
Дата:
At 16:27 28/11/2011, you wrote:
>Hi there!
>
>I built the current PostgreSQL 9.1.1 sources under Ubuntu 11.04 (in
>a VMware under Win7).
>I followed the steps in this guide:
>www.thegeekstuff.com/2009/04/linux-postgresql-install-and-configure-from-source
>
>It seems to work (I can run the server and connect to it with PgAdmin).
>
>Now I'd like to integrate the ODBC_FDW extension in my installation.
>However, I don't really
>understand the steps described on the download page:
>pgxn.org/dist/odbc_fdw/0.1.0
>
>Can anybody tell me how to build it? I'm a software developer myself
>but a Linux newbie...
>
>Thank you for your help!

As a final note, be careful to install only one odbc driver. Some
linux distros use iODBC and others use unixODBC but some apps install
the one they use so you can get a fail system with both libraries
"punching for being the king".

Re: odbc_fdw

От
Eduardo Morras
Дата:
At 16:27 28/11/2011, you wrote:
>Hi there!
>
>I built the current PostgreSQL 9.1.1 sources under Ubuntu 11.04 (in
>a VMware under Win7).
>I followed the steps in this guide:
>www.thegeekstuff.com/2009/04/linux-postgresql-install-and-configure-from-source
>
>It seems to work (I can run the server and connect to it with PgAdmin).
>
>Now I'd like to integrate the ODBC_FDW extension in my installation.
>However, I don't really
>understand the steps described on the download page:
>pgxn.org/dist/odbc_fdw/0.1.0
>
>Can anybody tell me how to build it? I'm a software developer myself
>but a Linux newbie...
>
>Thank you for your help!

As a final note, be careful to install only one odbc driver. Some
linux distros use iODBC and others use unixODBC but some apps install
the one they use so you can get a fail system with both libraries
"punching for being the king".



Re: odbc_fdw

От
Florian Schwendener
Дата:
Oh, didn't see that! Now it says:

root@ubuntu:/home/user/Downloads/odbc_fdw-0.1.0#
PATH=/usr/local/pgsql/bin/:$PATH make USE_PGXS=1
make: Nothing to be done for `all'.

I remember trying a few options with the make command. Is it maybe
already built?

Am 30.11.2011 09:46, schrieb Albe Laurenz:
> Florian Schwendener wrote:
>> Thank you for your help. As I know little about Linux and only a bit
>> about make files, I really don't know if
>> I'm doing the right thing. I've typed this:
>>
>> root@ubuntu:/home/user/Downloads/odbc_fdw-0.1.0#
>> PATH=/usr/local/pgsql/bin/:$PATH make USE_PGXS=1 make
>> make: *** No rule to make target `make'.  Stop.
>>
>> You see, I haven't come far... Am I doing something wrong?
> Yes, there are two "make"s in your line. Try
>
> PATH=/usr/local/pgsql/bin/:$PATH make USE_PGXS=1
>
> Yours,
> Laurenz Albe


Re: odbc_fdw

От
Florian Schwendener
Дата:
Hi Laurenz

Thank you for your help. As I know little about Linux and only a bit
about make files, I really don't know if
I'm doing the right thing. I've typed this:

root@ubuntu:/home/user/Downloads/odbc_fdw-0.1.0#
PATH=/usr/local/pgsql/bin/:$PATH make USE_PGXS=1 make
make: *** No rule to make target `make'.  Stop.

You see, I haven't come far... Am I doing something wrong?

Thanks again!
Flo

Am 29.11.2011 10:34, schrieb Albe Laurenz:
> fschwend at hsr.ch wrote:
>> I built the current PostgreSQL 9.1.1 sources under Ubuntu 11.04 (in a
> VMware under Win7).
>> I followed the steps in this guide:
>>
> www.thegeekstuff.com/2009/04/linux-postgresql-install-and-configure-from
> -source
>> It seems to work (I can run the server and connect to it with
> PgAdmin).
>> Now I'd like to integrate the ODBC_FDW extension in my installation.
> However, I don't really
>> understand the steps described on the download page:
>> pgxn.org/dist/odbc_fdw/0.1.0
>>
>> Can anybody tell me how to build it? I'm a software developer myself
> but a Linux newbie...
>
> I haven't tried it, but looking at the instructions I would say:
>
> 1) Install UnixODBC. If you use Packages, make sure you install the
> headers too
>     (on my RHEL system, the packages are called unixODBC and
> unixODBC-devel).
>
> 2) Get odbc_fdw and unzip the source.
>
> 3) Change into the source directory.
>
> 4) Run "make" and "make install" as the web page describes it
> (substituting
>     the path to your configured PostgreSQL source tree).
>
> If there still is something unclear, ask for details.
>
> Yours,
> Laurenz Albe


Re: odbc_fdw

От
Дата:
Thank you! That did it!

I was able to execute the CREATE EXTENSION command. I hope it will work from this point on, otherwise I know where to
findhelp:) 

Thanks again.
Florian

Am 30.11.2011 um 12:01 schrieb "Albe Laurenz" <laurenz.albe@wien.gv.at>:

> Florian Schwendener wrote:
> [has problems building odbc_fdw]
>> Oh, didn't see that! Now it says:
>>
>> root@ubuntu:/home/user/Downloads/odbc_fdw-0.1.0#
>> PATH=/usr/local/pgsql/bin/:$PATH make USE_PGXS=1
>> make: Nothing to be done for `all'.
>>
>> I remember trying a few options with the make command. Is it maybe
>> already built?
>
> Looks like it.
>
> You can
> PATH=/usr/local/pgsql/bin/:$PATH make USE_PGXS=1 clean
> to delete already built files.
>
> Then you can rebuild.
>
> After building, use
> PATH=/usr/local/pgsql/bin/:$PATH make USE_PGXS=1 install
> to install.
>
> Yours,
> Laurenz Albe

Re: odbc_fdw

От
"Albe Laurenz"
Дата:
Florian Schwendener wrote:
> I'm stuck again, now with the extension itself. I've tried like
> everything I could think of filling the fields in
> the example on [1]. My database is named "testdb", my table
"testtable"
> and the (default) schema is
> (I believe) "dbo". Does anybody know the values I need to enter in the
> CREATE FOREIGN TABLE command?
>
> The odbc-connection (named "odbc-test") works fine. The database
server
> is a Microsoft SQL Server 2008 R2.

The comment "I believe" seems to suggest that you are not sure -
maybe you can ask somebody who knows SQL Server for:

- DSN: The name of your ODBC data source
- Name of Database, schema and table.

> Sadly, if the extension can't execute the query, it just says "Opps".
> This isn't very helpful. Should I contact the
> author directly?

Can you quote the exact message?
If it is not helpful at all, yes, contacting the author is probably
the right thing to do.
There is also
https://github.com/ZhengYang/odbc_fdw/issues/
where you can report problems.

> References:
> [1] https://github.com/ZhengYang/odbc_fdw

Yours,
Laurenz Albe

Re: odbc_fdw

От
Florian Schwendener
Дата:
Hi again!

I'm stuck again, now with the extension itself. I've tried like
everything I could think of filling the fields in
the example on [1]. My database is named "testdb", my table "testtable"
and the (default) schema is
(I believe) "dbo". Does anybody know the values I need to enter in the
CREATE FOREIGN TABLE command?

The odbc-connection (named "odbc-test") works fine. The database server
is a Microsoft SQL Server 2008 R2.

Sadly, if the extension can't execute the query, it just says "Opps".
This isn't very helpful. Should I contact the
author directly?

Thanks again for your help.
Flo

References:
[1] https://github.com/ZhengYang/odbc_fdw

Am 30.11.2011 12:01, schrieb Albe Laurenz:
> Florian Schwendener wrote:
> [has problems building odbc_fdw]
>> Oh, didn't see that! Now it says:
>>
>> root@ubuntu:/home/user/Downloads/odbc_fdw-0.1.0#
>> PATH=/usr/local/pgsql/bin/:$PATH make USE_PGXS=1
>> make: Nothing to be done for `all'.
>>
>> I remember trying a few options with the make command. Is it maybe
>> already built?
> Looks like it.
>
> You can
> PATH=/usr/local/pgsql/bin/:$PATH make USE_PGXS=1 clean
> to delete already built files.
>
> Then you can rebuild.
>
> After building, use
> PATH=/usr/local/pgsql/bin/:$PATH make USE_PGXS=1 install
> to install.
>
> Yours,
> Laurenz Albe