Database Locations

Поиск
Список
Период
Сортировка
Искать

Database Locations

От:
Keith Gray <keith@heart.com.au>
Дата:
Has anyone had any joy with this example taken from documentation.

$ mkdir private_db$ initlocation ~/private_dbCreating Postgres database system directory /home/olly/private_db/base  $ psql ollyWelcome to psql, the PostgreSQL interactive terminal.Type:  \copyright for distribution terms       \h for help with SQL commands       \? for help on internal slash commands       \g or terminate with semicolon to execute query       \q to quit
olly=> CREATE DATABASE elsewhere WITH LOCATION = '/home/olly/private_db';CREATE DATABASE



I get an error like:-
olly=> create database test1 with location='/home/olly/private_db';ERROR:  Absolute paths are not allowed as database locations

...or at the command line...
$ createdb --location=/home/olly/private_db test1ERROR:  Absolute paths are not allowed as database locationscreatedb: database creation failed


-- 
Keith Gray

Technical Development Manager
Heart Consulting Services P/L
mailto:keith@heart.com.au

Re: Database Locations

От:
Peter Eisentraut <peter_e@gmx.net>
Дата:
Keith Gray writes:

> Has anyone had any joy with this example taken from documentation.

> 	olly=> create database test1 with location='/home/olly/private_db';
> 	ERROR:  Absolute paths are not allowed as database locations

Please read this (to the very end):

http://www.us.postgresql.org/users-lounge/docs/7.2/postgres/managing-databases.html#MANAGE-AG-ALTERNATE-LOCS

-- 
Peter Eisentraut   peter_e@gmx.net


Re: Database Locations

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Peter Eisentraut  writes:
> Keith Gray writes:
>> Has anyone had any joy with this example taken from documentation.

> Please read this (to the very end):

> http://www.us.postgresql.org/users-lounge/docs/7.2/postgres/managing-databases.html#MANAGE-AG-ALTERNATE-LOCS

But it does seem an unfortunate choice of example for the CREATE
DATABASE reference page to illustrate using a feature that's disabled by
default.  Seems like the ref page should mention that you need to have
compiled with whatever-that-option-symbol-is; or perhaps better, improve
the example to show how to do it with an environment variable.
		regards, tom lane

FAQ