Re: [SQL] prob with PERL/Postgres

2001-08-13 Thread Kate Collins
I use the Perl DBI module to connect to a postgres data base on the local system. I don't specify the host name. This is the syntax I use to connect to the data base: use DBI; $dbname = "foo"; $connstr = "dbi:Pg:dbname=$dbname"; $dbh = DBI->connect($connstr); Kristopher Yates wrote: > PERL S

Re: [SQL] prob with PERL/Postgres

2001-08-07 Thread Thomas Good
On Mon, 6 Aug 2001, Tom Lane wrote: > Thomas Good <[EMAIL PROTECTED]> writes: > > Kate, he uses a diff module by the same author (Edmund Mergl) but with > > a very diff syntax. The advantage of the DBI - Kris, if you're > > interested - is that the syntax is much like ESQL/C and the code is > >

Re: [SQL] prob with PERL/Postgres

2001-08-06 Thread Tom Lane
Thomas Good <[EMAIL PROTECTED]> writes: > Kate, he uses a diff module by the same author (Edmund Mergl) but with > a very diff syntax. The advantage of the DBI - Kris, if you're > interested - is that the syntax is much like ESQL/C and the code is > much more portable. For example I use DBI to a

Re: [SQL] prob with PERL/Postgres

2001-08-06 Thread Thomas Good
On Mon, 6 Aug 2001, Kate Collins wrote: > I use the Perl DBI module to connect to a postgres data base on the local > system. I don't specify the host name. This is the syntax I use to connect to > the data base: > > use DBI; > > $dbname = "foo"; > $connstr = "dbi:Pg:dbname=$dbname"; > $dbh =

Re: [SQL] prob with PERL/Postgres

2001-08-06 Thread clayton
Kristopher Yates wrote: >PERL SNIPPET: > ># build arrays from file (OMITTED) > >use Pg; >$dbhost='127.0.0.1'; >$dbname='mpact'; >#$connstr="dbname=$dbname"; >$connstr="host=$dbhost dbname=$dbname"; >$conn = Pg::connectdb($connstr); > >#more code related to date omitted > >$result=$conn->exec(

Re: [SQL] prob with PERL/Postgres

2001-08-06 Thread Kate Collins
I use the Perl DBI module to connect to a postgres data base on the local system. I don't specify the host name. This is the syntax I use to connect to the data base: use DBI; $dbname = "foo"; $connstr = "dbi:Pg:dbname=$dbname"; $dbh = DBI->connect($connstr); Kristopher Yates wrote: > PERL S

[SQL] prob with PERL/Postgres

2001-08-06 Thread Kristopher Yates
PERL SNIPPET: # build arrays from file (OMITTED) use Pg; $dbhost='127.0.0.1'; $dbname='mpact'; #$connstr="dbname=$dbname"; $connstr="host=$dbhost dbname=$dbname"; $conn = Pg::connectdb($connstr); #more code related to date omitted $result=$conn->exec($sql); (PGRES_COMMAND_OK eq $result