Database Connect

Started by Michaël Fieyalmost 25 years ago4 messagesgeneral
Jump to latest
#1Michaël Fiey
m.fiey@futuresoundtech.com

Hi,

I installed Postgresql 7.1 (RPMs for Redhat 7.0).
When I start psql with the command 'psql mydb', everything's ok
But whan I start psql with the command 'psql mybase@myhost' I receive :
psql: FATAL 1: Database "mybase@myhost" does not exist in system catalog

I used this syntax with Postgresql 7.03.
Is there some modifications between 7.03 and 7.1, or is it a bad config of
my server ?

Any help will be appreciated

Thank's a lot

Michael

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Michaël Fiey (#1)
Re: Database Connect

=?iso-8859-1?Q?Micha=EBl_Fiey?= <m.fiey@futuresoundtech.com> writes:

But whan I start psql with the command 'psql mybase@myhost' I receive :
psql: FATAL 1: Database "mybase@myhost" does not exist in system catalog

This syntax isn't supported.

I used this syntax with Postgresql 7.03.

There was some undocumented and mostly-broken code in libpq that tried
to be fancy about interpreting database names to mean more than just a
database name. I don't recall all the arguments for taking it out
versus trying to fix and document it, but the upshot was we took it out.

regards, tom lane

#3webb sprague
wsprague@o1.com
In reply to: Michaël Fiey (#1)
Re: Database Connect

Aahh! I have a million Perl scripts that rely on this syntax in the DBI
to connect to remote databases.

like:

$dbh=DBI->connect( "dbi:Pg:dbname=datab@remotehost",'wsprague','pass',
{RaiseError => 1, AutoCommit => 1})
or print STDERR "$DBI::errstr<p>";

Umm, do you have any idea what we should do now?

Thanks for all the effort that you guys have put into Postgres--if I was
following pgsql-hackers I probably could have put my 2 cents in earlier.

W

Tom Lane wrote:

Show quoted text

But whan I start psql with the command 'psql mybase@myhost' I receive :
psql: FATAL 1: Database "mybase@myhost" does not exist in system catalog

This syntax isn't supported.

#4Brett W. McCoy
bmccoy@chapelperilous.net
In reply to: webb sprague (#3)
Re: Database Connect

On Fri, 20 Apr 2001, webb sprague wrote:

Aahh! I have a million Perl scripts that rely on this syntax in the DBI
to connect to remote databases.

like:

$dbh=DBI->connect( "dbi:Pg:dbname=datab@remotehost",'wsprague','pass',
{RaiseError => 1, AutoCommit => 1})
or print STDERR "$DBI::errstr<p>";

Umm, do you have any idea what we should do now?

perl -pie 's|@remotehost|;host=remotehost|g' <file>

Or something to that effect :-)

-- Brett
http://www.chapelperilous.net/btfwk/
------------------------------------------------------------------------
Women in love consist of a little sighing, a little crying, a little dying
-- and a good deal of lying.
-- Ansey