Re: Pg 7.3.1 & DBD::Pg 1.21

Поиск
Список
Период
Сортировка
От Tariq Muhammad
Тема Re: Pg 7.3.1 & DBD::Pg 1.21
Дата
Msg-id Pine.LNX.4.21.0301231322210.4373-100000@genesis.int.libertyrms.com
обсуждение исходный текст
Ответ на Pg 7.3.1 & DBD::Pg 1.21  (Renê Salomão <rene@ibiz.com.br>)
Список pgsql-general
You need to add 164.35.10.17 to your pg_hba.conf file and do a kill -HUP
on the postmaster pid.

     _/_/     _/_/    _/_/  Tariq Muhammad
    _/  _/  _/   _/ _/  _/  tariq@libertyrms.info
   _/   _/ _/_/_/  _/_/_/   v:416-646-3304 x 111
  _/   _/ _/   _/ _/  _/    c:416-455-0272
 _/_/_/  _/_/_/  _/  _/     p:416-381-1457
_________________________________________________
     Liberty Registry Management Services Co.

On Thu, 23 Jan 2003, Renê Salomão wrote:

>  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";
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>


В списке pgsql-general по дате отправления:

Предыдущее
От: Andrew Sullivan
Дата:
Сообщение: Re: agregates
Следующее
От: Renê Salomão
Дата:
Сообщение: Re: Pg 7.3.1 & DBD::Pg 1.21