Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old November 23rd, 2005, 01:09 AM
Tom Allison
Guest
 
Posts: n/a
Default perl access

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

  #2  
Old November 23rd, 2005, 01:09 AM
Jim Seymour
Guest
 
Posts: n/a
Default 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

  #3  
Old November 23rd, 2005, 01:09 AM
Jim Seymour
Guest
 
Posts: n/a
Default 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

  #4  
Old November 23rd, 2005, 01:09 AM
Tom Allison
Guest
 
Posts: n/a
Default 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

  #5  
Old November 23rd, 2005, 01:09 AM
Tom Allison
Guest
 
Posts: n/a
Default 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

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles