Skip site navigation (1) Skip section navigation (2)

Re: [GENERAL] FATAL 1: Database dbname=template1 does not exist in pg_database

From: Andrew McMillan <Andrew(at)catalyst(dot)net(dot)nz>
To: chuettl(at)ahorn-Net(dot)de
Cc: PostgreSQL Liste Novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: [GENERAL] FATAL 1: Database dbname=template1 does not exist in pg_database
Date: 2000-06-26 11:41:50
Message-ID: 3957417E.8F332D02@catalyst.net.nz (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-novice
Carsten Huettl wrote:
> 
> Hello again,
> 
> When I ty to access my pgsql with apache and php3 I got the following
> error:
> 
> FATAL 1:  Database dbname=template1 does not exist in pg_database
> When I connect with psql I can see template1.
> 
> How do I insert template1 into pg_database?

Looks like you're using the wrong syntax for pg_open?

Try:
	$template_db = pg_Connect("dbname=template1");
or:
	$template_db = pg_Connect("", "", "", "", "template1");

Cheers,
					Andrew.

-- 
_____________________________________________________________________
            Andrew McMillan, e-mail: Andrew(at)cat-it(dot)co(dot)nz
Catalyst IT Ltd, PO Box 10-225, Level 22, 105 The Terrace, Wellington
Me: +64 (21) 635 694, Fax: +64 (4) 499 5596, Office: +64 (4) 499 2267



In response to

Responses

pgsql-novice by date

Next:From: Andrew McMillanDate: 2000-06-26 11:46:42
Subject: Re: Full-text searching and/or word indexing
Previous:From: Brett W. McCoyDate: 2000-06-26 10:46:44
Subject: Re: Full-text searching and/or word indexing

pgsql-general by date

Next:From: Andrea AimeDate: 2000-06-26 13:53:09
Subject: Nested transactions
Previous:From: Christophe DoréDate: 2000-06-26 10:35:11
Subject: 2 phase commit abilities

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group