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
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-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

Browse pgsql-general by date

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

Browse pgsql-novice by date

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