X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 44F7353454 for ; Thu, 24 Mar 2005 17:04:03 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 95208-05 for ; Thu, 24 Mar 2005 17:03:54 +0000 (GMT) Received: from extavgw4.ball.com (extavgw4.ball.com [162.18.103.211]) by svr1.postgresql.org (Postfix) with ESMTP id BFC2B53483 for ; Thu, 24 Mar 2005 17:03:52 +0000 (GMT) Received: from AEROMSG2.AERO.BALL.COM (Not Verified[162.18.82.144]) by extavgw4.ball.com with NetIQ MailMarshal (v6, 0, 3, 8) id ; Thu, 24 Mar 2005 10:04:14 -0700 Received: from daytonmsg2k3.AERO.BALL.COM ([162.18.199.42]) by AEROMSG2.AERO.BALL.COM with Microsoft SMTPSVC(6.0.3790.211); Thu, 24 Mar 2005 10:03:42 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C53093.71921E40" Subject: Create database error template 1 busy Date: Thu, 24 Mar 2005 12:03:47 -0500 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Create database error template 1 busy Thread-Index: AcUwk3GkOxL0eCP4QWST+sPamR4VpQ== From: "Clay, Bruce" To: X-OriginalArrivalTime: 24 Mar 2005 17:03:42.0885 (UTC) FILETIME=[6EE67550:01C53093] X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.046 tagged_above=0 required=5 tests=AWL, HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200503/74 X-Sequence-Number: 5403 This is a multi-part message in MIME format. ------_=_NextPart_001_01C53093.71921E40 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Set new_b_flag =3D TRUE =20 ------------------------------------------------------------------------ ------------------------------------------------------------------------ ----------------- Currently using PostgreSql 8.1 on a Windows XP precompiled release. =20 ------------------------------------------------------------------------ ------------------------------------------------------------------------ ----------------- =20 I am trying to create a data base with the following command going into pqexec() =20 CREATE DATABASE \"World\" WITH OWNER =3D bclay" " ENCODING =3D 'UNICODE' TABLESPACE =3D gisData" =20 =20 I always get the following error message: "source database "template1 is being accessed by other users" =20 There are no other users of this database since I am creating the GIS database from scratch. =20 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. =20 The next step in debugging I restarted pgAdmin III and tried the same command there and got the same message. =20 pgAdmin III shows "template1" to be the initial database. =20 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. =20 ------------------------------------------------------------------------ ------------------------------------------------------------------------ ----------------- =20 Issue 2 =20 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. =20 Is there a way to add a comment programmatically? =20 ------------------------------------------------------------------------ ------------------------------------------------------------------------ ----------------- =20 Issue 3 =20 How to get database description? =20 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. =20 2. If I issue the command < select * from pg_database > in pgAdmin query I see all of the current databases but no description strings. =20 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. =20 Is there a way to go from any pg_database ID to a corresponding pg_description ID to retrieve the correct description? =20 Bruce =20 =20 ------_=_NextPart_001_01C53093.71921E40 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Set new_b_flag =3D 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 =3D = bclay"

       " ENCODING =3D = 'UNICODE' TABLESPACE =3D 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:

   =             &= nbsp;        " 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

 

 

------_=_NextPart_001_01C53093.71921E40--