From: | Devrim GÜNDÜZ <devrim(at)gunduz(dot)org> |
---|---|
To: | John McLean <johnmclean80(at)gmail(dot)com> |
Cc: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: createdb |
Date: | 2012-11-13 17:09:03 |
Message-ID: | 1352826543.1935.139.camel@lenovo01-laptop03.gunduz.org |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
hi,
On Tue, 2012-11-13 at 17:00 +0000, John McLean wrote:
> When one runs: createdb 'database'
>
> should this create a directory named 'database' in the working directory?
No.
> If not, where are the files that this command creates?
All database files are under the database data directory by default, and
the actual location depends on the OS/distro that you are using. For
example, on my Fedora box, they are under /var/lib/pgsql/9.2/data/base
directory (notice data/base, which resolves to database). You can find
out yours by connecting to database and running:
SHOW data_directory ;
Then you will see OIDs of each database under the base/ directory. You
can query them by running:
SELECT oid, datname FROM pg_database;
or use oid2name command line utility.
Hope this will be a start.
Regards,
--
Devrim GÜNDÜZ
Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Community: devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
http://www.gunduz.org Twitter: http://twitter.com/devrimgunduz
From | Date | Subject | |
---|---|---|---|
Next Message | John R. Sowden | 2012-11-13 18:37:15 | php generator sample |
Previous Message | Lonni J Friedman | 2012-11-13 17:07:27 | Re: createdb |