socket connections
socket connections
От:
"Stuart Green" <sgreen@sitewarehouse.net>
Дата:
How do you force a postgres connection via a TCPIP socket and not a Unix Socket when connecting through the perl DBI? I found something in the postgres docs in the SSL area with a switch "-h localhost" (this is not in the man pages) but that didn't seem to do anything. Thanks
Re: socket connections
От:
"Randy Johnson" <rs.johnson@bigfoot.com>
Дата:
"Stuart Green" wrote in message
news:<91qihh$1uer$1@news.tht.net>...
> How do you force a postgres connection via a TCPIP socket and not a Unix
> Socket when connecting through the perl DBI?
>
> I found something in the postgres docs in the SSL area with a switch "-h
> localhost" (this is not in the man pages) but that didn't seem to do
> anything.
>
> Thanks
>
>
Hi.
I use something like this:
my $dsn = "dbi:Pg:dbname=mydb;host=localhost;port=5432";
my $dbh = DBI->connect("$dsn", "$username", "$password");
This works whether the host is localhost or not. Make sure that the
postmaster is started with the -i option.
The full syntax of the DBI connect is:
$dbh =
DBI->connect("dbi:Pg:dbname=$dbname;host=$host;port=$port;options=$options;t
ty=$tty", "$username", "$password");
Try 'perldoc DBD::Pg' for details.
Cheers,
Randy Johnson
ENABLE_SEQSCAN default value
От:
Jean-Arthur Silve <jeanarthur@eurovox.fr>
Дата:
Hello, I would like that the option ENABLE_SEQSCAN be OFF by default, without to have enter this statment at each session. (SET ENABLE_SEQSCAN=OFF) Is there an environment variable to set or something like that ?? thank you ! jean-arthur