Connecting Tech Pros Worldwide Forums | Help | Site Map

perl access

Tom Allison
Guest
 
Posts: n/a
#1: Nov 23 '05
I'm stuck on something stupid.

I'm trying to use perl to open up a database handle and I can't find the
right database dsn string.

my $data_source = "dbi:Pg:mydatabase";
my $username = "mydatebasereader";
my $auth = "secret";

my $dbh = DBI->connect($data_source, $username, $auth);



DBI connect('postfix','postfix',...) failed: missing "=" after "postfix"
in connection info string at /home/tallison/bin/perl.pl line 21

I've tried variations on the $data_source but I'm afraid I'm working on
a hit-n-miss process.

Can someone point me?


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org


Jim Seymour
Guest
 
Posts: n/a
#2: Nov 23 '05

re: perl access


Tom Allison <tallison@tacocat.net> wrote:[color=blue]
>
> I'm stuck on something stupid.
>
> I'm trying to use perl to open up a database handle and I can't find the
> right database dsn string.
>
> my $data_source = "dbi:Pg:mydatabase";
> my $username = "mydatebasereader";
> my $auth = "secret";
>
> my $dbh = DBI->connect($data_source, $username, $auth);
>
>
>
> DBI connect('postfix','postfix',...) failed: missing "=" after "postfix"
> in connection info string at /home/tallison/bin/perl.pl line 21
>
> I've tried variations on the $data_source but I'm afraid I'm working on
> a hit-n-miss process.
>
> Can someone point me?[/color]

Like this:

my $data_source = "dbi:Pg:dbname=mydatabase";
^^^^^^^

Jim

---------------------------(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

Jim Seymour
Guest
 
Posts: n/a
#3: Nov 23 '05

re: perl access


Tom Allison <tallison@tacocat.net> wrote:[color=blue]
>
> I'm stuck on something stupid.
>
> I'm trying to use perl to open up a database handle and I can't find the
> right database dsn string.
>
> my $data_source = "dbi:Pg:mydatabase";
> my $username = "mydatebasereader";
> my $auth = "secret";
>
> my $dbh = DBI->connect($data_source, $username, $auth);
>
>
>
> DBI connect('postfix','postfix',...) failed: missing "=" after "postfix"
> in connection info string at /home/tallison/bin/perl.pl line 21
>
> I've tried variations on the $data_source but I'm afraid I'm working on
> a hit-n-miss process.
>
> Can someone point me?[/color]

Like this:

my $data_source = "dbi:Pg:dbname=mydatabase";
^^^^^^^

Jim

---------------------------(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

Tom Allison
Guest
 
Posts: n/a
#4: Nov 23 '05

re: perl access


Jim Seymour wrote:[color=blue]
>
> Like this:
>
> my $data_source = "dbi:Pg:dbname=mydatabase";
> ^^^^^^^
>[/color]

thank you very much.

Now if I could just authenticate correctly...


---------------------------(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

Tom Allison
Guest
 
Posts: n/a
#5: Nov 23 '05

re: perl access


Jim Seymour wrote:[color=blue]
>
> Like this:
>
> my $data_source = "dbi:Pg:dbname=mydatabase";
> ^^^^^^^
>[/color]

thank you very much.

Now if I could just authenticate correctly...


---------------------------(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

Closed Thread


Similar PostgreSQL Database bytes