Обсуждение: connect problems
I’m just getting started, so please give me a break. I just installed Postgresql on HPUX and I’m trying to connect to it via a Perl app using DBI::Pg 1.22. I’m getting the following message that I think I understand. Yet, I’ve got no idea how to correct it.
DBI connect(‘dbname=nlog:host=cheddar’,’postgres’,…) failed: FATAL: Database “nlog:host=cheddar” does not exist in the system catalog. At ./nlog_maint line 244
What is the “system catalog” and how do I register my database? I created the database using psql, so I know it’s there.
Thanks, Dave.
"Zempel, David" <david.zempel@lmco.com> writes:
> I'm just getting started, so please give me a break. I just installed
> Postgresql on HPUX and I'm trying to connect to it via a Perl app using
> DBI::Pg 1.22. I'm getting the following message that I think I understand.
> Yet, I've got no idea how to correct it.
>
>
>
> DBI connect('dbname=nlog:host=cheddar','postgres',...) failed: FATAL:
> Database "nlog:host=cheddar" does not exist in the system catalog. At
> ./nlog_maint line 244
The syntax of your connection string looks wrong. Check the
documentation for DBD::Pg to get the correct syntax.
-Doug
> DBI connect('dbname=nlog:host=cheddar','postgres',...) failed: FATAL:
> Database "nlog:host=cheddar" does not exist in the system catalog.
Well, the perl code is thinking that the database name is
"nlog:host=cheddar" which, of course, does not exist. From the
rest of your line I'd guess you'd need to write something like
DBI connect('dbname=nlog', 'host=cheddar', ...)
> What is the "system catalog"
Sloppily it's a bunch of PostgreSQL internal tables, many of
them starting with pg_*
> and how do I register my database?
It's auto-registered by "create database" unless I am
mistaken.
Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346