Re: [GENERAL] FATAL 1: Database dbname=template1 does not exist in pg_database - Mailing list pgsql-novice

From Andrew McMillan
Subject Re: [GENERAL] FATAL 1: Database dbname=template1 does not exist in pg_database
Date
Msg-id 3957417E.8F332D02@catalyst.net.nz
Whole thread Raw
In response to FATAL 1: Database dbname=template1 does not exist in pg_database  (Carsten Huettl <chuettl@ahorn-Net.de>)
List 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@cat-it.co.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



pgsql-novice by date:

Previous
From: "D. Duccini"
Date:
Subject: Re: Full-text searching and/or word indexing
Next
From: Andrew McMillan
Date:
Subject: Re: Full-text searching and/or word indexing