Pg 7.3.1 & DBD::Pg 1.21
От | Renê Salomão |
---|---|
Тема | Pg 7.3.1 & DBD::Pg 1.21 |
Дата | |
Msg-id | 20030123152935.7f5e3477.rene@ibiz.com.br обсуждение исходный текст |
Ответ на | Constraint of only one legal value for a foreign key (Dennis Gearon <gearond@cvc.net>) |
Ответы |
Re: Pg 7.3.1 & DBD::Pg 1.21
Re: Pg 7.3.1 & DBD::Pg 1.21 |
Список | pgsql-general |
I was trying to connect to Pg 7.3.1 using perl and DBD::Pg 1.21, however the following error occurs: $ perl pg_connect.pl FATAL: No pg_hba.conf entry for host 164.35.10.17, user pgsql, database slave DBI connect('dbname=slave;host=164.35.10.17;port=5432','pgsql',...) failed: FATAL: No pg_hba.conf entry for host 164.35.10.17,user pgsql, database slave at pg_connect.pl line 16 $ Does anybody know what is wrong? Weird that the same function in perl works fine in 7.2.3.... Thanks. ----------------------------- Renê Salomão Ibiz Tecnologia -- www.ibiz.com.br Versão: [pgsql@slave:5432]#select version(); -[ RECORD 1 ]-------------------------------------------------------- version | PostgreSQL 7.3.1 on i586-pc-linux-gnu, compiled by GCC 2.96 $ psql -l -p 5432 List of databases Name | Owner -----------+------- slave | pgsql template0 | pgsql template1 | pgsql (3 rows) PG_HBA.CONF: # TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD local all all trust host all all 127.0.0.1 255.255.255.255 trust host all all 164.35.10.17 255.255.0.0 trust Versão: $ perl -e 'use DBI; print "$DBI::VERSION\n"' --> 1.32 $ perl -e 'use DBD::Pg; print "$DBD::Pg::VERSION\n";' --> 1.21 Função Perl: #!/usr/bin/perl use DBI; use DBD::Pg; use strict; my $dbh; my $dbname='slave'; my $host='164.35.10.17'; my $port='5432'; my $options=''; my $username='pgsql'; my $password='pgsql'; $dbh = DBI->connect("dbi:Pg:dbname=$dbname;host=$host;port=$port", "$username", "$password", { RaiseError => 1, AutoCommit => 0 }) || die $DBI::errstr; print "Connected!!!\n"; my $hSt = $dbh->prepare('SELECT * FROM table;'); $hSt->execute; while(my @raD = $hSt->fetchrow_array()) { print "$raD[0]\t$raD[1]\n";} $hSt->finish; $dbh->disconnect; print "Disconnected!!!\n";
В списке pgsql-general по дате отправления: