Discussion:
odbc_fdw
f***@hsr.ch
2011-11-28 15:27:58 UTC
Permalink
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!
--
Sent via pgsql-general mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Albe Laurenz
2011-11-29 09:34:30 UTC
Permalink
Post by f***@hsr.ch
I built the current PostgreSQL 9.1.1 sources under Ubuntu 11.04 (in a VMware under Win7).
www.thegeekstuff.com/2009/04/linux-postgresql-install-and-configure-from
-source
Post by f***@hsr.ch
It seems to work (I can run the server and connect to it with
PgAdmin).
Post by f***@hsr.ch
Now I'd like to integrate the ODBC_FDW extension in my installation. However, I don't really
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
--
Sent via pgsql-general mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Albe Laurenz
2011-11-30 08:46:05 UTC
Permalink
Thank you for your help. As I know little about Linux and only a bit
about make files, I really don't know if
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
--
Sent via pgsql-general mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Albe Laurenz
2011-11-30 11:01:05 UTC
Permalink
Florian Schwendener wrote:
[has problems building odbc_fdw]
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
--
Sent via pgsql-general mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
f***@hsr.ch
2011-12-02 13:50:33 UTC
Permalink
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 find help:)

Thanks again.
Florian
Post by Albe Laurenz
[has problems building odbc_fdw]
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
--
Sent via pgsql-general mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Albe Laurenz
2011-12-05 08:52:00 UTC
Permalink
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.
[1] https://github.com/ZhengYang/odbc_fdw
Yours,
Laurenz Albe
--
Sent via pgsql-general mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Florian Schwendener
2011-12-05 08:07:20 UTC
Permalink
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
Post by Albe Laurenz
[has problems building odbc_fdw]
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
--
Sent via pgsql-general mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Florian Schwendener
2011-11-30 10:10:23 UTC
Permalink
Oh, didn't see that! Now it says:

***@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?
Post by Albe 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
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
--
Sent via pgsql-general mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Florian Schwendener
2011-11-30 08:09:59 UTC
Permalink
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:

***@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
Post by f***@hsr.ch
Post by f***@hsr.ch
I built the current PostgreSQL 9.1.1 sources under Ubuntu 11.04 (in a
VMware under Win7).
www.thegeekstuff.com/2009/04/linux-postgresql-install-and-configure-from
-source
Post by f***@hsr.ch
It seems to work (I can run the server and connect to it with
PgAdmin).
Post by f***@hsr.ch
Now I'd like to integrate the ODBC_FDW extension in my installation.
However, I don't really
Post by f***@hsr.ch
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...
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
--
Sent via pgsql-general mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Eduardo Morras
2011-11-30 11:33:57 UTC
Permalink
Post by f***@hsr.ch
Hi there!
I built the current PostgreSQL 9.1.1 sources under Ubuntu 11.04 (in
a VMware under Win7).
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
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".
--
Sent via pgsql-general mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Loading...