Re: Problems with PostgreSQL DBI-Link / DBD-ODBC

From: David Fetter <david(at)fetter(dot)org>
To: "Pit M(dot)" <fmi-soft(at)gmx(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Problems with PostgreSQL DBI-Link / DBD-ODBC
Date: 2007-10-30 15:01:42
Message-ID: 20071030150142.GT14638@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Oct 30, 2007 at 01:12:41PM +0100, Pit M. wrote:
> Hi David!
>
> Thanks for the fast reply. So you mean that I might already have
> created a connection but am still trying to create the same one
> again?

Yes.

> >>Check whether the existing one works :)
> So how can I test it?

Fire up psql and do:

SELECT
data_source_id,
local_schema,
data_source
FROM
dbi_link.dbi_conection;

This gives you schemas you have created successfully. You can then
check what's in schema foo by doing:

\dv foo.*

> What is the correct way of accessing this data source in a select
> statement?
>
> Concerning the documents, I wouldn't say that they are unclear about
> make_accessor_functions(). The problem is, that in the dbi-link
> documents (quote: "Do the following, with the appropriate
> parameters. "Appropriate parameters" come from the perldoc of the
> appropriate DBD...") and in the dbi-odbc documents I can't find any
> information about the correct use of the parameters for the
> ODBC-connection. That's why I tried to create the connection so many
> times.

Ah, I see. I don't have an example of dbd-odbc just yet, but you
should be able to write a very short perl program which connects to
your data source.

http://www.easysoft.com/developer/languages/perl/dbd_odbc_tutorial_part_1.html

Once you've verified that that's working, you can set up a new
connection. The parameters you pass into $dbh coincide, not
coincidentally, with the first inputs to make_accessor_functions :)

Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bob Pawley 2007-10-30 15:34:35 Re: PostgreSQL and AutoCad
Previous Message Brian Wipf 2007-10-30 14:25:45 Re: Base Backups from PITR Standby