Creating database problem

From: "M(dot)A(dot) Oude Kotte" <marc(at)solcon(dot)nl>
To: pgsql-general(at)postgresql(dot)org
Subject: Creating database problem
Date: 2004-10-29 10:12:45
Message-ID: 4182179D.403@solcon.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi All,

I'm unsure if this is the correct mailinglist for my question. I have a
problem with CREATE DATABASE, but as the docs state that officially this
is not an SQL statement, I was unsure if I should subscribe to pgsql-sql
or pgsql-general.

NOTE: I've searched on google, postgresql.org, FAQ's and the
static/dynamic documentation, but I couldn't find a solution to my problem.

When I try to execute "CREATE DATABASE somename" while connected to
database template1 as a non-superuser with createdb-rights, I get the
error message "source database "template1" is being accessed by other
users". This is correct, as I'm connected to the same server using
pgAdmin III on a different PC. But my question is, why this error
message? I understand that I need to be using at least _some_ database
in other to connect. But why can I only create a new database (which, as
far as I know, has nothing to do with template1 itself) if I'm the only
connected user? Or am I missing something? I do need to be able to
create databases while other users are connected.

I've used MySQL in the past, which allows a user to create databases
whenever he likes, no matter how many people are connected. I expected
Postgres to do the same, but maybe I'm doing something wrong... :)

Thanks in advance for any help!

Marc

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Marco Colombo 2004-10-29 10:38:29 Re: Reasoning behind process instead of thread based
Previous Message Martijn van Oosterhout 2004-10-29 09:34:12 Re: Question Regarding Locks