Обсуждение: Snow Leopard and PG 8.4 problems....

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

Snow Leopard and PG 8.4 problems....

От
Jerry LeVan
Дата:
Gaaaah,

Last week postgresql was working fine, yesterday I upgraded to
Snow Leopard...

Everything seemed to be working and then I tried to move some
rows to another machine via dblink.

I am getting a variety of failures on dblink_connect..

mbp is my main machine let me connect to my home server ( named server )

[mbp:~]$ psql -Ulevan -hserver
psql (8.4.0)
Type "help" for help.

levan=# select dblink_connect('host=mbp.skynet user=levan dbname=levan
password=foobar');
ERROR:  could not establish connection
DETAIL:  could not translate host name "mbp.skynet" to address:
nodename nor servname provided, or not known

levan=# select dblink_connect('host=mbp user=levan dbname=levan
password=foobar');
ERROR:  could not establish connection
DETAIL:  could not translate host name "mbp" to address: nodename nor
servname provided, or not known

levan=# select dblink_connect('host=mbp.localdomain user=levan
dbname=levan password=foobar');
ERROR:  could not establish connection
DETAIL:  could not translate host name "mbp.localdomain" to address:
nodename nor servname provided, or not known

levan=# select dblink_connect('host=192.168.1.80 user=levan
dbname=levan password=foobar');
  dblink_connect
----------------
  OK
(1 row)

The name resolution appears to be buggered. Now server is almost my
local network name
server and it appears to be working just fine ie I can use Safari send
mail etc...

Now if I hop on to server and connect to mbp psql and try to use
dblink...

[mbp:~]$ ssh server
Password:
Last login: Sat Aug 29 11:10:48 2009 from mbp.localdomain
server:~ jerry$ psql -Ulevan -hmbp
psql (8.4.0)
Type "help" for help.

levan=# select dblink('host=server user=levan dbname=levan
password=foobar');
ERROR:  function dblink(unknown) does not exist
LINE 1: select dblink('host=server user=levan dbname=levan password=...
                ^
HINT:  No function matches the given name and argument types. You
might need to add explicit type casts.

***************************
Everything was working fine till the installation of Snow Leopard.

I tried to rebuild dblink but got many bizarre errors.

I tried to rebuild postgresql 8.4 but there were problems with python
and warnings about perl
the build did not succeed.

Anyone else having problems?

Jerry


Re: Snow Leopard and PG 8.4 problems....

От
Martin Gainty
Дата:
for superusers only

dblink-connect takes a libpq style connection string with hostaddr as first attribute

dblink("hostaddr=127.0.0.1 port=5432 dbname=mydb user=postgres password=mypasswd
");
http://www.postgresql.org/docs/current/static/contrib-dblink-connect.html
Martin Gainty
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.





> From: jerry.levan@eku.edu
> Subject: [GENERAL] Snow Leopard and PG 8.4 problems....
> Date: Sat, 29 Aug 2009 12:08:45 -0400
> To: pgsql-general@postgresql.org
>
> Gaaaah,
>
> Last week postgresql was working fine, yesterday I upgraded to
> Snow Leopard...
>
> Everything seemed to be working and then I tried to move some
> rows to another machine via dblink.
>
> I am getting a variety of failures on dblink_connect..
>
> mbp is my main machine let me connect to my home server ( named server )
>
> [mbp:~]$ psql -Ulevan -hserver
> psql (8.4.0)
> Type "help" for help.
>
> levan=# select dblink_connect('host=mbp.skynet user=levan dbname=levan
> password=foobar');
> ERROR: could not establish connection
> DETAIL: could not translate host name "mbp.skynet" to address:
> nodename nor servname provided, or not known
>
> levan=# select dblink_connect('host=mbp user=levan dbname=levan
> password=foobar');
> ERROR: could not establish connection
> DETAIL: could not translate host name "mbp" to address: nodename nor
> servname provided, or not known
>
> levan=# select dblink_connect('host=mbp.localdomain user=levan
> dbname=levan password=foobar');
> ERROR: could not establish connection
> DETAIL: could not translate host name "mbp.localdomain" to address:
> nodename nor servname provided, or not known
>
> levan=# select dblink_connect('host=192.168.1.80 user=levan
> dbname=levan password=foobar');
> dblink_connect
> ----------------
> OK
> (1 row)
>
> The name resolution appears to be buggered. Now server is almost my
> local network name
> server and it appears to be working just fine ie I can use Safari send
> mail etc...
>
> Now if I hop on to server and connect to mbp psql and try to use
> dblink...
>
> [mbp:~]$ ssh server
> Password:
> Last login: Sat Aug 29 11:10:48 2009 from mbp.localdomain
> server:~ jerry$ psql -Ulevan -hmbp
> psql (8.4.0)
> Type "help" for help.
>
> levan=# select dblink('host=server user=levan dbname=levan
> password=foobar');
> ERROR: function dblink(unknown) does not exist
> LINE 1: select dblink('host=server user=levan dbname=levan password=...
> ^
> HINT: No function matches the given name and argument types. You
> might need to add explicit type casts.
>
> ***************************
> Everything was working fine till the installation of Snow Leopard.
>
> I tried to rebuild dblink but got many bizarre errors.
>
> I tried to rebuild postgresql 8.4 but there were problems with python
> and warnings about perl
> the build did not succeed.
>
> Anyone else having problems?
>
> Jerry
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general


With Windows Live, you can organize, edit, and share your photos. Click here.

Re: Snow Leopard and PG 8.4 problems....

От
Jerry LeVan
Дата:
On Aug 29, 2009, at 2:40 PM, Martin Gainty wrote:

> for superusers only
>
> dblink-connect takes a libpq style connection string with hostaddr
> as first attribute
>
> dblink("hostaddr=127.0.0.1 port=5432 dbname=mydb user=postgres
> password=mypasswd");
> http://www.postgresql.org/docs/current/static/contrib-dblink-connect.html
> Martin Gainty
>
I have been able to use just the ip in the host field but Snow Leopard
seems to have
broken using a 'name' in the host field... see below.

It appears that compiling pg 8.4 gives rise to libs with architecture
of x386_64...
What sort of magic do I have to use to get a 32 bit version of the
various libs ?
( I don't seem to be able to find where in the make file I can ask the
linker to
add the various archs, but I am getting bleary eyed.)

I don't seem to be able to compile python support against the apple
2.6 or the macpython
2.5 versions (of python).

Has anyone built a Snow Leopard version of pg with python support?
Am I the only one to have problems with dblink on Snow Leopard?

( the fedora 11 rpms work fine...)

Jerry


>
>
>
>
>
> > From: jerry.levan@eku.edu
> > Subject: [GENERAL] Snow Leopard and PG 8.4 problems....
> > Date: Sat, 29 Aug 2009 12:08:45 -0400
> > To: pgsql-general@postgresql.org
> >
> > Gaaaah,
> >
> > Last week postgresql was working fine, yesterday I upgraded to
> > Snow Leopard...
> >
> > Everything seemed to be working and then I tried to move some
> > rows to another machine via dblink.
> >
> > I am getting a variety of failures on dblink_connect..
> >
> > mbp is my main machine let me connect to my home server ( named
> server )
> >
> > [mbp:~]$ psql -Ulevan -hserver
> > psql (8.4.0)
> > Type "help" for help.
> >
> > levan=# select dblink_connect('host=mbp.skynet user=levan
> dbname=levan
> > password=foobar');
> > ERROR: could not establish connection
> > DETAIL: could not translate host name "mbp.skynet" to address:
> > nodename nor servname provided, or not known
> >
> > levan=# select dblink_connect('host=mbp user=levan dbname=levan
> > password=foobar');
> > ERROR: could not establish connection
> > DETAIL: could not translate host name "mbp" to address: nodename nor
> > servname provided, or not known
> >
> > levan=# select dblink_connect('host=mbp.localdomain user=levan
> > dbname=levan password=foobar');
> > ERROR: could not establish connection
> > DETAIL: could not translate host name "mbp.localdomain" to address:
> > nodename nor servname provided, or not known
> >
> > levan=# select dblink_connect('host=192.168.1.80 user=levan
> > dbname=levan password=foobar');
> > dblink_connect
> > ----------------
> > OK
> > (1 row)
> >
> > The name resolution appears to be buggered. Now server is almost my
> > local network name
> > server and it appears to be working just fine ie I can use Safari
> send
> > mail etc...
> >
> > Now if I hop on to server and connect to mbp psql and try to use
> > dblink...
> >
> > [mbp:~]$ ssh server
> > Password:
> > Last login: Sat Aug 29 11:10:48 2009 from mbp.localdomain
> > server:~ jerry$ psql -Ulevan -hmbp
> > psql (8.4.0)
> > Type "help" for help.
> >
> > levan=# select dblink('host=server user=levan dbname=levan
> > password=foobar');
> > ERROR: function dblink(unknown) does not exist
> > LINE 1: select dblink('host=server user=levan dbname=levan
> password=...
> > ^
> > HINT: No function matches the given name and argument types. You
> > might need to add explicit type casts.
> >
> > ***************************
> > Everything was working fine till the installation of Snow Leopard.
> >
> > I tried to rebuild dblink but got many bizarre errors.
> >
> > I tried to rebuild postgresql 8.4 but there were problems with
> python
> > and warnings about perl
> > the build did not succeed.
> >
> > Anyone else having problems?
> >
> > Jerry
> >
> >
> > --
> > Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> > To make changes to your subscription:
> > http://www.postgresql.org/mailpref/pgsql-general
>
> With Windows Live, you can organize, edit, and share your photos.
> Click here.


Re: Snow Leopard and PG 8.4 problems....

От
Jan Otto
Дата:
Hi Jerry,

> I have been able to use just the ip in the host field but Snow
> Leopard seems to have
> broken using a 'name' in the host field... see below.
>
> It appears that compiling pg 8.4 gives rise to libs with
> architecture of x386_64...

hm, i have no problems to compile postgresql on snow leopard. all
linking defaults
to x86_64-architecture on my machine. you have probably installed
macports or
fink and build 32-libs on mac os x 10.5 before you upgraded to snow
leopard?
try removing all references to these 3rd-party libs and try compile
again.

> What sort of magic do I have to use to get a 32 bit version of the
> various libs ?
> ( I don't seem to be able to find where in the make file I can ask
> the linker to
> add the various archs, but I am getting bleary eyed.)
>
> I don't seem to be able to compile python support against the apple
> 2.6 or the macpython
> 2.5 versions (of python).

it works out of the box on my machine: ./configure --enable-python
python 2.6 (delivered in snow leopard) is used and compiles without
any warning or
error.

> Has anyone built a Snow Leopard version of pg with python support?

yes.

> Am I the only one to have problems with dblink on Snow Leopard?

i dont use dblink so i cant say if it is broken on my machine too.

regards, jan otto