From: | "Clay, Bruce" <bclay(at)ball(dot)com> |
---|---|
To: | <pgsql-interfaces(at)postgresql(dot)org> |
Subject: | Create database error template 1 busy |
Date: | 2005-03-24 17:03:47 |
Message-ID: | C482FF98AE985A47B8C982FD429C9E344F2528@daytonmsg2k3.AERO.BALL.COM |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces |
Set new_b_flag = TRUE
------------------------------------------------------------------------
------------------------------------------------------------------------
-----------------
Currently using PostgreSql 8.1 on a Windows XP precompiled release.
------------------------------------------------------------------------
------------------------------------------------------------------------
-----------------
I am trying to create a data base with the following command going into
pqexec()
CREATE DATABASE \"World\" WITH OWNER = bclay"
" ENCODING = 'UNICODE' TABLESPACE = gisData"
I always get the following error message:
"source database "template1 is being accessed by
other users"
There are no other users of this database since I am creating the GIS
database from scratch.
Based on comments I found on the net when others encountered the same
error message, I closed pgAdmin III to make sure it is not causing the
problem.
The next step in debugging I restarted pgAdmin III and tried the same
command there and got the same message.
pgAdmin III shows "template1" to be the initial database.
It turns out that the only way I can create a database is to specify
template0 in the Create Database call or use pgAdmin to create one that
can use template1.
------------------------------------------------------------------------
------------------------------------------------------------------------
-----------------
Issue 2
Also, when I tried to add a comment while creaating the database using
the following string:
" COMMENT ON DATABASE \"World\" IS 'World GIS
Database'"
the create works but I the comment does not show up.
Is there a way to add a comment programmatically?
------------------------------------------------------------------------
------------------------------------------------------------------------
-----------------
Issue 3
How to get database description?
1. I added a description filed using pgAdmin. I can see the description
I added in pgAdmin when I click on the database name so I know it is
there.
2. If I issue the command < select * from pg_database > in pgAdmin query
I see all of the current databases but no description strings.
3. If I issue the command < select * from pg_description > in pgAdmin
query I see all of the descriptions that I added from pgAdmin but the
objoid is not the same as the oid that shows when I issued the < select
* from pg_database > command. So I can not select the correct
description.
Is there a way to go from any pg_database ID to a corresponding
pg_description ID to retrieve the correct description?
Bruce
From | Date | Subject | |
---|---|---|---|
Next Message | Vita Voom Software | 2005-03-24 19:48:20 | Released pgExpress Driver v3.01 |
Previous Message | Jeff Eckermann | 2005-03-24 15:10:29 | Re: MS Access as front-end, migration from MSDE to POstgreSQL? |