Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@xxxxxxxxx

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

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux